node-sqlite3 icon indicating copy to clipboard operation
node-sqlite3 copied to clipboard

"ENOENT: no such file or directory, rename ..." when running npm install

Open kevinmannn opened this issue 9 years ago • 41 comments

After running npm install --save-dev sqlite3, each subsequent time I try to run npm install I get an error relating to "ENOENT: no such file or directory, rename ...".

The first subsequent run resulted in the following: npm ERR! path /Users/[...]/node_modules/.staging/npmlog-702088a9 npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/Users/[...]/node_modules/.staging/npmlog-702088a9' -> '/Users/[...]/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog' npm ERR! enoent This is related to npm not being able to find a file.

The next run resulted in this error: npm ERR! path /Users/[...]/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 '/Users/[..]/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates' -> '/Users/[...]/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.

Environment: MacOS 10.12.6 NPM 5.3.0 Node v6.11.2 Also occurring on Jenkins on Ubuntu 16.04 LTS.

kevinmannn avatar Aug 16 '17 17:08 kevinmannn

us npm ci to clean and install all packages. and then install the package you want. it works for me this way

fdmxfarhan avatar Jul 19 '21 09:07 fdmxfarhan