meanjs / mean

MEAN.JS - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js -
http://meanjs.org
MIT License
4.87k stars 1.98k forks source link

npm install failed for eslint-config-airbnb@6.0.2 #1674

Open luebken opened 7 years ago

luebken commented 7 years ago

I've just did a npm installon a fresh copy of master and got the following.

...
npm WARN eslint-config-airbnb@6.0.2 requires a peer of eslint-plugin-react@^4.0.0 but none was installed.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/7.2.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.2.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! v8-debug@0.7.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug@0.7.7 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs v8-debug
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls v8-debug
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mdl/workspace/redhat/examples/meanjs-app/npm-debug.log
luebken commented 7 years ago

I've fixed this by following the instructions from https://www.npmjs.com/package/eslint-config-airbnb

(
  export PKG=eslint-config-airbnb;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)

But to be honest I don't know what happened there. Is that something that can be a) automated? or b) documented?

lirantal commented 7 years ago

@luebken can you explain more about your fix, I don't follow why/where we would need to do that. You're welcome to propose a PR too.

Jageen commented 7 years ago

So @luebken not decided to share solution ?, I am still having issue @lirantal do you have any information regarding this.

luebken commented 7 years ago

@lirantal I'm sorry I can't explain the fix. I was just searching for the upmost warning and that link that I posted seemed to have done the trick. My assumption was that it had todo with some peerDependencies. But that is again a wild guess.