Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Ionaru opened this issue Sep 25, 2017 · 15 comments
Closed

Comments

@Ionaru
Copy link

Ionaru commented Sep 25, 2017

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

@springmeyer
Copy link
Contributor

Ugh, I thought this was solved. See #866.

So, it errors on first run? Can you test again? Make sure you delete any package-lock.json before trying to install?

@Ionaru
Copy link
Author

Ionaru commented Sep 25, 2017

It gives me the errors on subsequent runs after the first install. (I'll edit the original post a bit to be more clear)

@springmeyer
Copy link
Contributor

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?

@Ionaru
Copy link
Author

Ionaru commented Sep 25, 2017

I am already using NPM 5.4.2 (See log output and environment info) 😉

@springmeyer
Copy link
Contributor

I am already using NPM 5.4.2 (See log output and environment info)

oh, sorry I missed that. hmmm.

@Ionaru
Copy link
Author

Ionaru commented Sep 26, 2017

Any luck reproducing the issue? Let me know if you need more information.

@wayofthefuture
Copy link

+1

@springmeyer
Copy link
Contributor

Yes, I was able to replicate. However I'm not sure how to fix. So, anyone hitting this the workaround are:

  • downgrade to npm from node v6
  • remove your package-lock.json

@Ionaru
Copy link
Author

Ionaru commented Sep 27, 2017

Another workaround is to pin your sqlite3 version to the last one without this issue (v3.1.11):
npm install sqlite3@3.1.11 --save-exact

Nostradamos pushed a commit to Nostradamos/plantjournal-api-sqlite3 that referenced this issue Sep 27, 2017
Pinned sqlite3 to 3.1.11 because this version doesn't make trouble.
TryGhost/node-sqlite3#890
Zeilen,
@springmeyer
Copy link
Contributor

springmeyer commented Sep 28, 2017

Can everyone hitting this error test again with the newly released sqlite3@3.0.13? 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).

@Ionaru
Copy link
Author

Ionaru commented Sep 28, 2017

I just tested with node 8.6.0, npm 5.4.2 on Windows 10, and it looks like sqlite3@3.1.13 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.

@springmeyer
Copy link
Contributor

Great, thanks for the prelim testing. Look forward to your results for windows tomorrow.

@Ionaru
Copy link
Author

Ionaru commented Oct 2, 2017

sqlite3@3.1.13 installs without issues on Linux as well, thanks @springmeyer for the quick update! 😄

@Ionaru Ionaru closed this as completed Oct 2, 2017
@springmeyer
Copy link
Contributor

Great. Thanks for the followup @Ionaru

markablov added a commit to markablov/sequelize-mocking that referenced this issue Dec 26, 2017
rochejul added a commit to rochejul/sequelize-mocking that referenced this issue Dec 29, 2017
@TLiu2014
Copy link

TLiu2014 commented Feb 2, 2018

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 localhost to 80 and 443 on registry.npmjs.org. This solution is inspired from this issue Could not contact DNS Server Error #79..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants