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
Can't NPM Install: ENOENT: no such file or directory .staging/core-js-c2a9e69c (solved with rm -rf node_modules && npm install)
#9474
Comments
|
Delete Hey @mintplugins, |
|
@Soean Thanks for the response. NPM version: 5.6.0 I do not use Unfortunately, deleting |
|
I just upgraded NPM to version 6.4.1, but it did not result in any changes either. I am still getting the same error. |
|
@mintplugins, thanks for opening this issue. After running npm ERR! path <my-local-path>/gutenberg/node_modules/@wordpress/hooks/node_modules/core-js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '<my-local-path>/gutenberg/node_modules/@wordpress/hooks/node_modules/core-js' -> '<my-local-path>/gutenberg/packages/i18n/node_modules/core-js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent Node: |
|
I've run into this issue quite often ~1 month ago. @ntwb Is this issue being tracked somewhere? |
|
Not tracked anywhere, it's a common issue, maybe it should be documented in the repo somewhere |
I wasn't able to find a good place for this in our existing documentation. We have With this being said, searching GitHub issues is fairly standard practice. Given the specificity of this error, I think we can have it live in GitHub issue history for now. |
|
@danielbachhuber I tried running the code you provided, but after running it, which took about 20 minutes to complete, I tried to run |
|
@danielbachhuber False alarm - it does seem to have worked now! Great - thank you! |
rm -rf node_modules && npm install)
|
Close the vs code and go to directory via terminal and install npm from the terminal. |
|
My node version is 8.12.0 I also got this issue today only & I have resolved it by removing package-lock.json file & then try to install packages with --unsafe-perm rm -rf package-lock.json It works for me |
|
on windows, run terminal as Administratior work fine for me |
|
If there is a character or a space other than the English characters from the user name, it can also be caused by this. I'm talking about the installation of global packages. If you are installing a package on a specific project, it may also be caused by the lack of package.json. |
npm ERR! path D:\TutsGalaxy\angular-and-node\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open 'D:\TutsGalaxy\angular-and-node\package.json' 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! D:\Program Files\nodejs\node_cache\_logs\2019-02-14T12_50_27_473Z-debug.log How do you solve this problem? |
|
In my case |
|
In my case, I removed the |
It works, thanks mate.... |
|
I've just come across this and thought it worth adding my experience with the same error. Our build passes, but executing the same commands locally doesn't. One thing I found was that our build (on Bitbucket Pipelines) was using |
|
I've tried to install the package in CMD instead of the terminal of the VSCode. use CMD (Command Prompt). it works for me |
|
That may sound a bit weird but i fixed it by creating a new folder in a different path. |
|
Some of my co-workers are getting the same error, I have an angular 8 - nx project, that i put on our internal source control. my local and build machines works fine, some people get "npm WARN tar ENOENT: no such file or directory, open...." when running npm install. |
I was getting the same error in a personal project and this resolved the issue for me. Remove the |
|
I get this problem if my PackageA has a local path dependency on my PackageB (file:../PackageB), which has its own dependency list, and I don't do an will give me this problem. If I I solved this by using |
|
Am still getting this issue with below npm and node versions. This is happening for any new projects too, without any package-lock.json file. Any advise? Thanks |
|
I had similar problem after upgrading to Ubuntu 19.04 and creating new user. My versions now: |
|
If you unpublish a version on a local repository and republish it, you may have this issue. NPM 5.6.0 (at least) do not always warn you about wrong sha512 checksum on packages. When you install a package, there is some cache on already installed packages (sha512 checksums). The command I had to publish a new version of the package involved and the error has gone. |
|
Just delete |
|
Try: If the issue still persists check if you have a global version of any of the packages installed. |
|
Actually, figured out this is due to symlink mapped to user folder being shared by multiple node instances. Just running npm install from powershell before opening vs code resolves it all the time. Earlier, even after deleting package-lock.json or a fresh project, it was still complaining. |
|
This is the only true fix for this issue; please vote this man up! |
|
Im getting the same issue. deleting the package-lock.json is not an option in my case. How do you guys fixed it? This is bugging me for 2 days now. Need help |
|
I met this issue on Windows. I updated node and npm to the latest LTS version and rerun It worked. |
|
In my case I had missing .npmrc file with custom package registry (and access of some packages access as result) |
|
For me worked for me. Or just try But before all these please check the version is updated or not. |
|
None of the above solutions worked for me on Windows 10 and Powershell (run as user / run as administrator). I have then switched to using the Git Bash (included in Git for Windows, https://gitforwindows.org/), which resolved the issue for me. |
This is for Linux terminal. Not for windows. |
|
I had the same issue. But, none of the above solutions worked for my case. I did the git clone again in a new folder and then it worked fine for me. I am using windows 10 and git bash terminal. |
i had same issue today and your solution is worked |
|
I had similar issues as ya'll on Windows due to a package-lock.json file one directory above. Removed the file and installed flawlessly. |
|
Nothing here helped me. Turned out I did not have
Did not know |
|
I have presented the same error due to npm cache problems. Run npm install --cache /tmp/empty-cache |
|
I have no clue if this is going to help anyone, and to be honest I am not even sure if this fixed my issue. I tried installing/deleting and reinstalling a billion times nothing helped. One of the two fixed my issue:
Good luck! |
Worked for me perfectly ! |
|
Deleting package-lock.json is quite risky especially if you on slightly old projects.. According to this post it might be due to race condition.. https://stackoverflow.com/a/52997767/3050426 |
The Internet seems to believe that "no such file or directory, rename" issues are due to a race condition in NPM, and that deleting and regenerating package-lock.json works around the issue. This seems to fix the issue for us. WordPress/gutenberg#9474 (comment)
The Internet seems to believe that "no such file or directory, rename" errors we are running into are due to a race condition in NPM, and that deleting and regenerating package-lock.json works around the issue. This indeed appears to fix the issue for us. WordPress/gutenberg#9474 (comment)
The Internet seems to believe that "no such file or directory, rename" errors we are running into are due to a race condition in NPM, and that deleting and regenerating package-lock.json works around the issue. This indeed appears to fix the issue for us. WordPress/gutenberg#9474 (comment)
Describe the problem
When attempting to run
npm installin the Gutenberg directory, it fails with this error:`ENOENT: no such file or directory, rename '[removed path to my local WP enironment]/wp-content/plugins/gutenberg/node_modules/.staging/core-js-c2a9e69c' -> '[removed path to my local WP enironment]/wp-content/plugins/gutenberg/packages/hooks/node_modules/core-js'
To Reproduce
Steps to reproduce the behavior:
npm installwhile in that directory in Terminal on MacExpected behavior
I expect NPM to install without any issues.
Desktop (please complete the following information):
** Additional Information**
The node_modules directory does get created before it fails, and I see a .staging file in that directory during setup, but it is ultimately removed by the time the error happens in Terminal. See screenshot of node_modules directory:
Any assistance would be highly appreciated.
The text was updated successfully, but these errors were encountered: