查看npm全局安装的包的问题,求解
发布于 7 年前 作者 wangxuedongOvO 5477 次浏览 来自 问答

想查看npm全局安装的包,好不容易找到了一个命令:

$ npm list -g --depth=0

结果如下:

/usr/local/lib
├── bower@1.8.2
├── cnpm@5.1.1
├── express-generator@4.15.0
├── gulp@3.9.1
├── live-server@1.2.0
├── n@2.1.8
├── npm@5.3.0
├── react-create-app@2.0.6
├── stylus@0.54.5
├── supervisor@0.12.0
├── webpack@3.6.0
└── yarn@1.0.2

npm ERR! invalid: colors@1.1.2 /usr/local/lib/node_modules/live-server/node_modules/colors
npm ERR! invalid: cors@2.8.4 /usr/local/lib/node_modules/live-server/node_modules/cors
npm ERR! invalid: event-stream@3.3.4 /usr/local/lib/node_modules/live-server/node_modules/event-stream
npm ERR! invalid: object-assign@4.1.1 /usr/local/lib/node_modules/live-server/node_modules/object-assign
npm ERR! invalid: opn@5.1.0 /usr/local/lib/node_modules/live-server/node_modules/_opn@5.1.0@opn
npm ERR! invalid: proxy-middleware@0.15.0 /usr/local/lib/node_modules/live-server/node_modules/_proxy-middleware@0.15.0@proxy-middleware
npm ERR! invalid: send@0.15.6 /usr/local/lib/node_modules/live-server/node_modules/send
npm ERR! missing: npm-package-arg@^4.1.1, required by realize-package-specifier@3.0.3
npm ERR! invalid: glob@6.0.4 /usr/local/lib/node_modules/npm/node_modules/init-package-json/node_modules/glob
npm ERR! missing: strip-ansi@^3.0.1, required by gauge@2.6.0
npm ERR! missing: strip-ansi@^3.0.0, required by string-width@1.0.2
npm ERR! invalid: readable-stream@2.0.6 /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream
npm ERR! missing: strip-ansi@^3.0.1, required by gauge@2.6.0
npm ERR! missing: strip-ansi@^3.0.0, required by string-width@1.0.2
npm ERR! invalid: glob@6.0.4 /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/glob
npm ERR! missing: strip-ansi@^3.0.0, required by chalk@1.1.3

虽然查看到了全局安装的包,但是有一些错误,怎么去掉啊,或者怎么解决啊,超级强迫症,。。。。。。。 求解啊。。。。。。。

2 回复

全局安装的包在 /usr/local/lib/node_modules/ 目录下

怎么解决错误啊

回到顶部