The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm install fails with "ENOENT: no such file or directory"
I’m writing here since the issue npm install fails with “ENOENT: no such file or directory” has been closed and can only be commented by members.
I’m still experiencing the issue, using latest version npm, but that is not why I’m creating a topic here. I’ll try to create a reproducible repository with email@example.com. As far as I recall the issue is not present in firstname.lastname@example.org.
From my perspective such advice is miss-leading at best. I though
package-lock.json can be used to get re-producible installs of packages i.e. you get the exact same versions across installations regardless of when the installation is executed. If we remove
package-lock.json we’re back to potentially unpredictable installations and thus builds and deployments.
The issue you linked to has a bunch of unrelated issues discussed in a single place, so at minimum, debug logs would be necessary to move forward with this. If you can put together a reproducer, that’s even better.
Typically we suggest removing the package-lock.json when recovering from a bug that resulted in corrupted lock-files.It would be a one-time action and once npm has regenerated a lock file using a version of npm without whatever bug was causing the original problem, you would have no need to clear it again. If the problem recurs, then as Kat’s comment suggests, the bug is not fixed and we’d like to hear details.
If you haven’t tried regenerating your lockfile yet, I’d encourage you to do so and see if it ever crops up again. But a reproducer either way would be much appreciated.