无法删除ubuntu上的angularcli

时间:2017-12-16 13:41:58

标签: angularjs ubuntu

我想重新安装angularcli,因为

➜  Angular ng serve          
node_modules appears empty, you may need to run `npm install`

在项目文件夹中出现这样的错误。

删除,我做那些

root@caner:/home/caner# npm uninstall -g @angular/cli
up to date in 0.036s
root@caner:/home/caner# npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
npm ERR! 
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-12-16T13_38_28_855Z-debug.log
root@caner:/home/caner# npm uninstall -g angular-cli
up to date in 0.034s
root@caner:/home/caner# npm uninstall -g @angular/cli

up to date in 0.041s

我在不同的时间做了两件事,验证并强迫

root@caner:/home/caner# npm cache verify
Cache verified and compressed (~/.npm/_cacache):
Content verified: 0 (0 bytes)
Index entries: 0
Finished in 0.011s
root@caner:/home/caner# npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.

但仍然显示了ng的版本:

    root@caner:/home/caner# ng -v

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.1
Node: 9.2.1
OS: linux x64
Angular: 
...
root@caner:/h

所以,这就是为什么我认为我无法删除它。

我该如何删除?

ubuntu 17.04

0 个答案:

没有答案