npm uninstall -g无效

时间:2018-04-10 01:37:43

标签: npm uninstall

我试过npm uninstall -g无效。

首先我试过npm ls -g --depth = 0它产生了以下结果

  /usr/local/lib
  ├── UNMET PEER DEPENDENCY @babel/core@7.0.0-beta.4
  ├── @babel/node@7.0.0-beta.44
  ├── aws-cli@0.0.2
  ├── babel-core@6.26.0
  ├── babel-loader@7.1.4
  ├── babel-plugin-transform-decorators-legacy@1.3.4
  ├── babel-plugin-transform-object-rest-spread@6.26.0
  ├── babel-plugin-transform-optional-chaining@7.0.0-beta.3
  ├── babel-preset-react@6.24.1
  ├── babel-preset-stage-3@6.24.1
  ├── babel-register@7.0.0-beta.3
  ├── coffeescript@2.2.4
  ├── graceful-fs@4.1.11
  ├── minimatch@3.0.4
  ├── n@2.1.8
  ├── npm@5.8.0
  ├── ntdl@1.0.2
  ├── pdf-compress@1.0.0 -> /home/ubuntu/workarea/sourcecode/pdf-optimise
  ├── virtualenv@0.3.1
  ├── UNMET PEER DEPENDENCY webpack@2 || 3 || 4
  └── yarn@1.5.1

  npm ERR! peer dep missing: @babel/core@7.0.0-beta.44, required by 
  @babel/node@7.0.0-beta.44
  npm ERR! peer dep missing: webpack@2 || 3 || 4, required by babel- 
  loader@7.1.4 
  npm ERR! peer dep missing: @babel/core@7.0.0-beta.44, required by 
  @babel/register@7.0.0-beta.44
  npm ERR! peer dep missing: webpack@>=0.9 <2 || ^2.1.0-beta || ^2.2.0, 
  required by worker-loader@0.8.1
  }

然后我尝试卸载它没有成功

  root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# sudo npm 
  uninstall -g @babel/node@7.0.0-beta.44
  up to date in 0.063s

  root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# babel-node -- 
  version
  7.0.0-beta.44

Then I tried

  root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# npm uninstall 
  -g *
  npm ERR! code ENOLOCAL
  npm ERR! Could not install from 
  "../../home/ubuntu/workarea/sourcecode/ntdl" as it does not contain a 
  package.json file.

  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2018-04-10T01_33_46_993Z-debug.log

请帮我解决这个问题。

非常感谢,

Bharath AK

1 个答案:

答案 0 :(得分:0)

你尝试过这个吗? npm uninstall npm -g

see here