Same as closed issue #866, looks like regression.
First npm install (No package-lock.json and node_modules folder in project)
added 134 packages in 4.538s
npm verb exit [ 0, true ]
npm info ok
Run npm install again (package-lock.json and node_modules folder now exist in the project)
npm verb stack Error: ENOENT: no such file or directory, rename '/home/jeroen.akkerman/Projects/sqlite/node_modules/.staging/npmlog-3e544aa7' -> '/home/jeroen.akkerman/Projects/sqlite/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog'
npm verb cwd /home/jeroen.akkerman/Projects/sqlite
npm verb Linux 4.10.0-35-generic
npm verb argv "/usr/bin/node" "/usr/bin/npm" "--verbose" "i"
npm verb node v8.5.0
npm verb npm v5.4.2
npm ERR! path /home/jeroen.akkerman/Projects/sqlite/node_modules/.staging/npmlog-3e544aa7
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/jeroen.akkerman/Projects/sqlite/node_modules/.staging/npmlog-3e544aa7' -> '/home/jeroen.akkerman/Projects/sqlite/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.
npm ERR! enoent
npm verb exit [ -2, true ]
Run npm install another time
npm verb stack Error: ENOENT: no such file or directory, rename '/home/jeroen.akkerman/Projects/sqlite/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates' -> '/home/jeroen.akkerman/Projects/sqlite/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/.delegates.DELETE'
npm verb cwd /home/jeroen.akkerman/Projects/sqlite
npm verb Linux 4.10.0-35-generic
npm verb argv "/usr/bin/node" "/usr/bin/npm" "--verbose" "i"
npm verb node v8.5.0
npm verb npm v5.4.2
npm ERR! path /home/jeroen.akkerman/Projects/sqlite/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/jeroen.akkerman/Projects/sqlite/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates' -> '/home/jeroen.akkerman/Projects/sqlite/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 verb exit [ -2, true ]
Environment
Sqlite 3.1.12
Node 8.5.0
NPM 5.4.2
Ugh, I thought this was solved. See https://github.com/mapbox/node-sqlite3/issues/866.
So, it errors on first run? Can you test again? Make sure you delete any package-lock.json before trying to install?
It gives me the errors on subsequent runs after the first install. (I'll edit the original post a bit to be more clear)
Thanks @Ionaru. I was able to replicate an error on second run with node v8.4.0 and npm 5.3.0. I've found that I cannot replicate an error if I upgrade to npm 5.4.2. Can you try using npm 5.4.2 and see if the problem goes away?
I am already using NPM 5.4.2 (See log output and environment info) :wink:
I am already using NPM 5.4.2 (See log output and environment info)
oh, sorry I missed that. hmmm.
Any luck reproducing the issue? Let me know if you need more information.
+1
Yes, I was able to replicate. However I'm not sure how to fix. So, anyone hitting this the workaround are:
package-lock.jsonAnother workaround is to pin your sqlite3 version to the last one without this issue (v3.1.11):
npm install [email protected] --save-exact
Can everyone hitting this error test again with the newly released [email protected]? Does the problem go away? I ran npm install and npm publish using npm v5.3.0. I'm guessing/hoping that will avoid the problem (whereas previously I was using npm v2.15.11 via node v4.8.3).
I just tested with node 8.6.0, npm 5.4.2 on Windows 10, and it looks like [email protected] doesn't have this issue anymore. Great job! 馃憤
The original issue was from a Linux system, I won't be able to test it on that until tomorrow.
Great, thanks for the prelim testing. Look forward to your results for windows tomorrow.
[email protected] installs without issues on Linux as well, thanks @springmeyer for the quick update! :smile:
Great. Thanks for the followup @Ionaru
In my Windows 7, the error is solved by adding 127.0.0.1 registry.npmjs.org to C:\Windows\System32\drivers\etc\hosts, to forward ports 80 and 443 on localhostto 80 and 443 on registry.npmjs.org. This solution is inspired from this issue Could not contact DNS Server Error #79..
Most helpful comment
Yes, I was able to replicate. However I'm not sure how to fix. So, anyone hitting this the workaround are:
package-lock.json