aseemk / requireDir

Node.js helper to require() directories.
MIT License
484 stars 60 forks source link

EPEERINVALID under node@v4.2.3 #24

Closed piotrd closed 6 years ago

piotrd commented 8 years ago

When testing readiness of my build to be used with the newest nodejs v4.2.3, I encounter (among others) this error:

npm info it worked if it ends with ok
npm info using npm@2.14.14
npm info using node@v4.2.3
npm info package.json prompt@0.2.14 No license field.
npm info package.json gulp-rename@1.2.2 No license field.
npm info package.json gulp-task-listing@1.0.1 No license field.
npm info attempt registry request try #1 at 4:56:22 AM
npm http request GET https://registry.npmjs.org/require-dir
npm http 304 https://registry.npmjs.org/require-dir
npm info install require-dir@0.3.0 into /var/upgrade-ready/4d5cae60-9cc8-11e5-9d3e-9f93a8a5e566
npm info installOne require-dir@0.3.0
npm info preinstall require-dir@0.3.0
npm info build /var/upgrade-ready/4d5cae60-9cc8-11e5-9d3e-9f93a8a5e566/node_modules/require-dir
npm info linkStuff require-dir@0.3.0
npm info install require-dir@0.3.0
npm info postinstall require-dir@0.3.0
npm ERR! Linux 3.13.0-57-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "require-dir@0.3.0" "-d" "--nodedir=\"/root/.nvm/versions/node/v4.2.3\""
npm ERR! node v4.2.3
npm ERR! npm  v2.14.14
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package undefined does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma-browserify@4.4.2 wants undefined@>=0.10
npm ERR! peerinvalid Peer karma-phantomjs-launcher@0.2.1 wants undefined@>=0.9

npm ERR! Please include the following file with any support request:
npm ERR!     /var/upgrade-ready/4d5cae60-9cc8-11e5-9d3e-9f93a8a5e566/npm-debug.log

This means that I cannot launch my project with current require-dir. Any thoughts? I am using https://www.npmjs.com/package/upgrade-ready tool for readiness verification.

aseemk commented 8 years ago

Hmm, that error talks about packages I don't recognize (karma-browserify, etc.).

requireDir has no (non-dev) dependencies, post-install hook, etc.:

https://github.com/aseemk/requireDir/blob/master/package.json

So that error may not be for requireDir...

Let me know if I'm wrong though, and good luck!

piotrd commented 8 years ago

Thanks for a prompt comment. I'll try to investigate that further.

sholladay commented 8 years ago

FWIW, this looks suspiciously like a problem with npm itself.

I would first attempt to fix the environment with:

# Wipe existing dependencies.
# May or may not need sudo, depending on who owns node_modules
sudo rm -rf node_modules;
# Make sure npm isn't using a corrupted cache or anything.
npm cache clean;
# Upgrade npm to the latest version.
npm install -g npm@latest;

Then try to install this module again:

# Fresh install of all dependencies in package.json
# Presumably, you've put require-dir in there.
npm install;
yocontra commented 6 years ago

shouldn't be an issue anymore, let me know if it is and i can reopen