NPM dependency issues with Meteor project!


#1

Hey folks. I’m currently having an issue when trying to run a cloned version of a project I’ve been working on.

Basically, I’m using the following as a project.json for my current project:

{
  "name": "dauntless",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "material-ui": "^0.15.0-alpha.2",
    "meteor-node-stubs": "~0.2.0",
    "react": "^15.0.1",
    "react-addons-pure-render-mixin": "^15.0.1",
    "react-dom": "^15.0.1",
    "react-form": "0.0.2",
    "react-modal": "^1.0.0",
    "react-redux": "^4.4.2",
    "react-router": "^2.0.1",
    "react-tap-event-plugin": "git+https://github.com/zilverline/react-tap-event-plugin.git",
    "redux": "^3.4.0",
    "redux-form": "^5.0.1",
    "redux-logger": "^2.6.1"
  }
}

Nothing out of the ordinary here that I can see, really.

When I try to run meteor npm install to install these packages on my laptop, I get the following error(s):

[misutowolf@corki dauntless]$ meteor npm i
npm WARN peerDependencies The peer dependency react@^0.14.0 included from material-ui will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react-dom@^0.14.0 included from material-ui will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react-tap-event-plugin@^0.2.0 included from material-ui will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN engine inline-style-prefixer@1.0.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.43","npm":"2.14.22"})
npm WARN peerDependencies The peer dependency react@^0.14.8 included from react-addons-create-fragment will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react@^0.14.8 included from react-addons-pure-render-mixin will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react@^0.14.8 included from react-addons-update will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react@^0.14.8 included from react-addons-transition-group will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react@^0.14.0 included from recompose will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm ERR! install trying to install 0.2.2 to /home/misutowolf/projects/dauntless/node_modules/react-tap-event-plugin
npm ERR! install but already installed versions [ '1.0.0' ]
npm WARN peerDependencies The peer dependency react@^0.14.0 included from react-tap-event-plugin will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm ERR! install trying to install 0.2.1 to /home/misutowolf/projects/dauntless/node_modules/react-tap-event-plugin/node_modules/fbjs
npm ERR! install but already installed versions [ '0.2.1' ]
npm ERR! install trying to install 1.2.6 to /home/misutowolf/projects/dauntless/node_modules/react-tap-event-plugin/node_modules/fbjs/node_modules/core-js
npm ERR! install but already installed versions [ '1.2.6' ]
npm ERR! install trying to install 0.9.0 to /home/misutowolf/projects/dauntless/node_modules/react-tap-event-plugin/node_modules/fbjs/node_modules/whatwg-fetch
npm ERR! install but already installed versions [ '0.9.0' ]
npm ERR! install trying to install 7.1.1 to /home/misutowolf/projects/dauntless/node_modules/react-tap-event-plugin/node_modules/fbjs/node_modules/promise
npm ERR! install but already installed versions [ '7.1.1' ]
npm ERR! install trying to install 2.0.3 to /home/misutowolf/projects/dauntless/node_modules/react-tap-event-plugin/node_modules/fbjs/node_modules/promise/node_modules/asap
npm ERR! install but already installed versions [ '2.0.3' ]
npm ERR! Linux 4.4.5-1-ARCH
npm ERR! argv "node" "/home/misutowolf/.meteor/packages/meteor-tool/.1.3.1.1ww979p++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "i"
npm ERR! node v0.10.43
npm ERR! npm  v2.14.22
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package react@15.0.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer material-ui@0.15.0-alpha.2 wants react@^0.14.0
npm ERR! peerinvalid Peer react-addons-pure-render-mixin@15.0.1 wants react@^15.0.1
npm ERR! peerinvalid Peer react-dom@15.0.1 wants react@^15.0.1
npm ERR! peerinvalid Peer react-modal@1.1.0 wants react@^0.14.0 || ^15.0.0-0
npm ERR! peerinvalid Peer react-redux@4.4.4 wants react@^0.14.0 || ^15.0.0-0
npm ERR! peerinvalid Peer react-tap-event-plugin@0.2.2 wants react@^0.14.0

npm ERR! Please include the following file with any support request:
npm ERR!     /home/misutowolf/projects/dauntless/npm-debug.log

It seems that there’s some sort of dependency issue with some of the packages I’m using in my project, but what I don’t really understand is why I’m not getting these issues on my desktop, where my code seems to work fine.

Any thoughts?

As for npm itself, the only difference is that on my desktop, I have “normal” NPM installed (v5.10.1), as well as the version of Node that exists as part of Meteor. My laptop doesn’t have a normal Node installation, and NPM installation relies solely on meteor npm i, as opposed to my desktop just running npm install.

Could this be the difference causing the problem?


#2

Lots of people running into this. I’m not 100% sure why, but a few things:

  • Change your react-tap-event-plugin to ^1.0.0 (they fixed the bugs)
  • Do rm -rf node_modules && meteor npm install

#3

Same stuff happens, getting the following errors:

npm ERR! Linux 4.4.5-1-ARCH
npm ERR! argv "node" "/home/misutowolf/.meteor/packages/meteor-tool/.1.3.1.1ww979p++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "install"
npm ERR! node v0.10.43
npm ERR! npm  v2.14.22
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package react@15.0.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer material-ui@0.15.0-alpha.2 wants react@^0.14.0
npm ERR! peerinvalid Peer react-addons-pure-render-mixin@15.0.1 wants react@^15.0.1
npm ERR! peerinvalid Peer react-dom@15.0.1 wants react@^15.0.1
npm ERR! peerinvalid Peer react-modal@1.1.0 wants react@^0.14.0 || ^15.0.0-0
npm ERR! peerinvalid Peer react-redux@4.4.4 wants react@^0.14.0 || ^15.0.0-0
npm ERR! peerinvalid Peer react-tap-event-plugin@1.0.0 wants react@^15.0.0-0

It’s as if it doesn’t think the newest version of React (15.0.1) is adequate enough to meet dependency requirements, and as such, I guess I’m not going to be able to get my app to work. Which is stupid, considering I haven’t changed anything.


#4

The plot thickens. Despite throwing these errors, my app runs fine and seems to behave normally.


#5

[deleted]
somehow my node_modules got corrupted. removing them did the trick


#6

Deleting node_modules and reinstalling the packages one by one worked for me.