Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Npm should throw an error when unable to move a package from node_modules/.staging to node_modules. #19469

Open
1 task done
petvas opened this issue Dec 27, 2017 · 0 comments

Comments

@petvas
Copy link

petvas commented Dec 27, 2017

I'm opening this issue because:

  • npm is doing something I don't understand.

What's going wrong?

I think npm should throw an error when unable to move a folder.

When I am installing gulp package, I got an error:

npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Files\Work\SourceCode\LockTest10\node_modules\atob' -> 'C:\Files\Work\SourceCode\LockTest10\node_modules\.atob.DELETE'

the issue is in https://github.com/npm/npm/blob/latest/lib/install/action/finalize.js#L67 not throwing error when it is unable to move:
c:\Files\Work\SourceCode\LockTest9\node_modules\.staging\atob-f7ed28db\
to
c:\Files\Work\SourceCode\LockTest9\node_modules\atob\

How can the CLI team reproduce the problem?

I am not sure.

supporting information:

  • npm -v prints: 5.5.1
  • node -v prints: v8.9.1
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Windows
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant