一尘不染

错误:使用Ionic时找不到模块'../lib/utils/unsupported.js'

node.js

当我运行“离子启动项目名称”时,总是收到以下错误消息:

错误信息

Running command - failed![ERROR] An error occurred while running npm install (exit code 1):

    module.js:471
        throw err;
        ^

    Error: Cannot find module '../lib/utils/unsupported.js'
        at Function.Module._resolveFilename (module.js:469:15)
        at Function.Module._load (module.js:417:25)
        at Module.require (module.js:497:17)
        at require (internal/module.js:20:19)
        at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:79:3)
        at Module._compile (module.js:570:32)
        at Object.Module._extensions..js (module.js:579:10)
        at Module.load (module.js:487:32)
        at tryModuleLoad (module.js:446:12)

阅读 344

收藏
2020-07-07

共1个答案

一尘不染

尝试/usr/local/lib/node_modules/npm再次删除并重新安装节点。这应该工作。

在带有Homebrew的 MacOS上:

sudo rm -rf /usr/local/lib/node_modules/npm
brew reinstall node
2020-07-07