错误在npm安装

当我的node_modules安装一个新的软件包时,出现以下错误:

npm install --save [package] npm ERR! path /home/user/Dev/application-name-example/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/home/user/Dev/application-name-example/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates' -> '/home/user/Dev/application-name-example/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/.delegates.DELETE' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2017-08-28T11_02_39_419Z-debug.log 

它不能重命名的特定文件在几个常见的违法者中有所不同,但它总是一个重命名问题。 我可以用rm -rf node_modules来解决这个rm -rf node_modules ,但是这不是一个每次都要做的理想的解决scheme。

我见过的类似问题build议做这个: npm:ENOENT:没有这样的文件或目录

这只发生在一个新的项目上,并没有发生在旧的项目上,有谁知道为什么? 它与path长度或package.jsonconfiguration有关吗?