generator-karma does not satisfy its siblings' peerDependencies requirements

后端 未结 6 614
野性不改
野性不改 2021-02-03 22:46

The same notorious error

npm ERR! peerinvalid The package generator-karma does not satisfy its siblings\' peerDependencies requirements!
npm ERR! peerinvalid Peer ge         


        
相关标签:
6条回答
  • 2021-02-03 23:07

    You need to update all of your globally installed NPM packages. Run this command from your console:

    npm update -g
    

    This command will update all the packages listed to the latest version (specified by the tag config).

    It will also install missing packages.

    When you specify the -g flag, this command will update globally installed packages. If no package name is specified, all packages in the specified location (global or local) will be updated.

    0 讨论(0)
  • 2021-02-03 23:07

    I had permissions issues with some of the directories under /usr/local/lib/node_modules. I must have installed some packages with sudo but most under my own user id. I solved this issue on a Mac with these commands:

    sudo chown -R `whoami` /usr/local/lib/node_modules/
    sudo chgrp -R admin /usr/local/lib/node_modules/
    
    0 讨论(0)
  • 2021-02-03 23:08

    Try running npm uninstall -g generator-karma

    0 讨论(0)
  • 2021-02-03 23:09

    i was able to install simply by:

    npm install karma-generator
    

    Guess it installs a later version of Karma. I was able to successfully install generator-angular after that. Was able to get coffeescript going as well after doing the above.

    0 讨论(0)
  • 2021-02-03 23:11

    I had a similar issue and I did this in terminal:

    rm -rf /usr/local/lib/node_modules/karma-*

    and then updated the package.json:

      "devDependencies": {
        "karma": "0.12.0",
        ...
      }
    

    then reinstall

    sudo npm install karma

    It worked for me

    0 讨论(0)
  • 2021-02-03 23:11

    It fixed it by running this command, which installs the latest version from GitHub:

    $ npm install -g git://github.com/iamblue/generator-angular-ui-router.git
    
    0 讨论(0)
提交回复
热议问题