npm でライブラリをアンインストールする方法
npm でインストールしたライブラリをアンインストールする方法をメモします。
書き方
npm uninstall パッケージ名
package.jsonのdevDependenciesが下記だったとする
package.json
{
"name": "npm uninstall",
"version": "0.1.0",
"private": true,
"scripts": {
},
"dependencies": {
},
"devDependencies": {
"@types/node": "^14.14.14",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"prettier": "2.2.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"tslint-react": "^5.0.0",
"typescript": "^4.1.3"
}
}
「prettier」をアンインストールしたい場合は下記のように書く
npm uninstall prettier
npm uninstall パッケージ名
package.json
{
"name": "npm uninstall",
"version": "0.1.0",
"private": true,
"scripts": {
},
"dependencies": {
},
"devDependencies": {
"@types/node": "^14.14.14",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"prettier": "2.2.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"tslint-react": "^5.0.0",
"typescript": "^4.1.3"
}
}
「prettier」をアンインストールしたい場合は下記のように書く
npm uninstall prettier
npm uninstall prettier
npm install したときは、--save-devとかが必要だったけど、uninstallするときはいらないみたい。(2020/12/28時点)
Author And Source
この問題について(npm でライブラリをアンインストールする方法), 我々は、より多くの情報をここで見つけました https://qiita.com/BlackMagician/items/f2dabcae6422545a6e47著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .