How do I uninstall a package installed using npm link?

前端 未结 5 1937
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 15:42

When installing a node package using sudo npm link in the package\'s directory, how can I uninstall the package once I\'m done with development?

n

5条回答
  •  感动是毒
    2020-12-22 16:05

    you can use unlink to remove the symlink.

    For Example:

    cd ~/projects/node-redis 
    npm link                 
    cd ~/projects/node-bloggy
    npm link redis             # links to your local redis
    

    To reinstall from your package.json:

    npm unlink redis
    npm install
    

    https://www.tachyonstemplates.com/npm-cheat-sheet/#unlinking-a-npm-package-from-an-application

提交回复
热议问题