Karma problems when trying to set up an angular project

I am trying to set up an environment that supports angular / coffeescript / sass / jade .. and it has been said that angular-curve does an excellent job.

I am stuck in this part: after cloning the repo and running npm install I get this error:

 npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer grunt-karma@0.5.4 wants karma@ ~0.9.4 || ~0.10 npm ERR! peerinvalid Peer karma-chrome-launcher@0.1.4 wants karma@ >=0.9.3 npm ERR! peerinvalid Peer karma-firefox-launcher@0.1.3 wants karma@ >=0.9 npm ERR! peerinvalid Peer karma-html2js-preprocessor@0.1.0 wants karma@ >=0.9 npm ERR! peerinvalid Peer karma-jasmine@0.1.5 wants karma@ >=0.9 npm ERR! peerinvalid Peer karma-requirejs@0.2.2 wants karma@ >=0.9 npm ERR! peerinvalid Peer karma-script-launcher@0.1.0 wants karma@ >=0.9 npm ERR! peerinvalid Peer karma-coffee-preprocessor@0.2.1 wants karma@ >=0.11.14 npm ERR! peerinvalid Peer karma-phantomjs-launcher@0.1.4 wants karma@ >=0.9 npm ERR! System Darwin 13.1.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Users/abdullah/dev/js/sandbox/bayt npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.9 npm ERR! code EPEERINVALID npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/abdullah/dev/js/sandbox/bayt/npm-debug.log npm ERR! not ok code 0 

see the output of my npm ls here , and npm ls global returns empty.

Based on the background of rails / bundler and reading that npm allows nested dependencies (i.e. you can have two libraries, each of which depends on different versions) Why not, how does this happen? Help someone?

+6
source share
1 answer

Just change the karma version in package.json to "karma": "^0.9.0" or "karma": ">=0.9.0" and do an npm update

Update

Also try updating grunt-karma . I just tried and did not work with previous changes. So, as you mentioned: "grunt-karma": ">=0.5.0" , "karma": ">=0.9.0", and npm update .

In fact, I usually delete all versions from such obsolete package files and do npm update , because in the end you need to update them (it seems like a newbie might not be recommended). So, if the previous one does not help, you can try this. The last time I have only one small problem with the latest versions.

Prior to this, you can also enter npm cache clean in the console.

+6
source

Source: https://habr.com/ru/post/969821/


All Articles