How do I update devDependencies in NPM?

前端 未结 8 2058
长发绾君心
长发绾君心 2020-12-12 10:52

npm update seems to just update the packages in dependencies, but what about devDependencies.

Right now you can install

8条回答
  •  天涯浪人
    2020-12-12 11:35

    If you are using outdated npm version it might be the problem. So before any other commands execute:

    sudo npm install npm -g
    

    or (if above doesn't work):

    sudo npm update npm -g
    

    Then relaunch the console (in order for changes to take effect). Now you can check your new npm --version and if it is up to date execute:

    npm update
    

    or (if you prefer):

    npm update --save-dev
    

提交回复
热议问题