简体   繁体   中英

npm rename errors with nested project structure

I have a NodeJS project that has nested subprojects with package.json of their own. If I change any dependency in subprojects I get errors like this one:

npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/travis/build/phylogeny-explorer/explorer/node_modules/.staging/user-api-9886b2c7/node_modules/basic-auth' -> '/home/travis/build/phylogeny-explorer/explorer/node_modules/.staging/basic-auth-38c0f109'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

They persist even after removing package-lock.json and node_modules. Depending on where you would run, the .staging/basic-auth-38c0f109 part changes the package name and the hash in the end. I have observed this error even in Travis CI run - https://travis-ci.org/phylogeny-explorer/explorer/builds/488195843

Changing of the root level dependencies works fine with no errors.

It looks like some babel auto-generating thing, but I can't tell what's wrong.

Code of the project in question is at https://github.com/phylogeny-explorer/explorer

This was a bug fixed by https://github.com/npm/cli/pull/86

Update your npm to v6.8.0-next.2 if you experience this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM