我一直试图在我的package.json文件上运行npm install,但是我遇到了很多麻烦。 在我所有的依赖中,它总是说“错误:尝试解锁尚未被locking的XXX”。 这是其中之一: Error: Attempt to unlock tbd@~0.6.4, which hasn't been locked at unlock (/usr/local/lib/node_modules/npm/lib/cache.js:1304:11) at cb (/usr/local/lib/node_modules/npm/lib/cache.js:646:5) at /usr/local/lib/node_modules/npm/lib/cache.js:655:20 at /usr/local/lib/node_modules/npm/lib/cache.js:1290:7 at /usr/local/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38 at OpenReq.Req.done (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5) at OpenReq.done (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22) at Object.oncomplete (fs.js:107:15) 如果我试图以sudo的方式运行它,似乎进一步,并开始安装一些包,但一些新的错误popup,而不是: > chokidar@0.8.1 postinstall /Users/tkirchner/Documents/Projects/mm-datatable/node_modules/karma/node_modules/chokidar > node setup-deps.js shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied node.js:811 […]