npm install fails with "ENOENT: no such file or directory"

(Piotr Mionskowski) #1

Hi :wave:
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 npm@6.1.x. As far as I recall the issue is not present in npm@5.6.0.

I’m trying to understand how come you (@zkat) advice the removal of package-lock.json as resolution step for the linked Github issue. Could you please elaborate on that?

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.

ENOENT when globally installing multiple folders
(Rebecca Turner) #2

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.

(system) #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.