NPM 不工作.找不到模块 'strip ansi' [英] NPM not working. Cannot find module 'strip ansi'

查看:34
本文介绍了NPM 不工作.找不到模块 'strip ansi'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚下载了 node,但 npm 不起作用.每当我使用 npm comman 时,我都会收到错误:找不到模块strip-ansi".

I just downloaded node but npm is not working. whenever I use a npm comman I get Error: cannot find module 'strip-ansi'.

推荐答案

无论如何,这最终发生在我身上,在 mac 上使用 nvm.npm 缓存清理 不起作用.我最终通过 nvm 重新安装:

For what it's worth, this ended up happening to me, using nvm on mac. npm cache clean didn't work. I ended up reinstalling via nvm:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
$ nvm install node

这篇关于NPM 不工作.找不到模块 'strip ansi'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆