【问题标题】:npm command not working,showing the error "Cannot find module 'strip-ansi''npm 命令不起作用,显示错误“找不到模块 'strip-ansi''
【发布时间】:2017-02-20 18:42:21
【问题描述】:

最近我遇到了一个问题......当我尝试使用 .....npm start 之类的命令启动我的项目时,它会显示问题以及我执行的命令与什么相关npm 它会显示错误。

即使我尝试检查我的 npm 版本,我也会收到错误。

我猜是全局安装了一些东西,导致错误发生。

我完全不知道这一点,有人可以帮助我...谢谢。 问题:

Cannot find module 'strip-ansi'

【问题讨论】:

    标签: npm gruntjs node-modules


    【解决方案1】:

    我遇到了同样的问题,我是这样解决的:

    因为您正在尝试升级sails,我认为这可能是您当前安装的软件包的问题。您是否尝试过删除 node_modules 文件夹(清理 npm 缓存)并重新安装节点包?

    cd /path/to/your/sails/folder
    rm -r node_modules
    npm cache clean
    npm install
    

    来源:https://github.com/balderdashy/sails/issues/2744

    【讨论】:

      猜你喜欢
      • 2018-04-02
      • 1970-01-01
      • 1970-01-01
      • 2018-08-11
      • 2021-09-11
      • 1970-01-01
      • 2014-10-04
      • 2016-03-04
      • 2021-09-16
      相关资源
      最近更新 更多