美文网首页
解决Error: Cannot find module 'cha

解决Error: Cannot find module 'cha

作者: 桔子橙子柚子_F | 来源:发表于2020-09-21 14:10 被阅读0次

    方案一:
    安装chalk模块

    npm install chalk
    

    或者,删掉node_modules,重新运行

    npm install
    

    方案二:
    看报错信息

    Error: Cannot find module 'chalk'
    Require stack:
    - /Users/gyq/.orionos-cli/dist/tools/logOutput.js
    - /Users/gyq/.orionos-cli/dist/index.js
    - /usr/local/lib/node_modules/orionos-cli/dist/index.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1014:15)
        at Function.Module._load (internal/modules/cjs/loader.js:884:27)
        at Module.require (internal/modules/cjs/loader.js:1074:19)
        at require (internal/modules/cjs/helpers.js:72:18)
        at Object.<anonymous> (/Users/gyq/.orionos-cli/dist/tools/logOutput.js:8:72)
        at Module._compile (internal/modules/cjs/loader.js:1185:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
        at Module.load (internal/modules/cjs/loader.js:1034:32)
        at Function.Module._load (internal/modules/cjs/loader.js:923:14)
        at Module.require (internal/modules/cjs/loader.js:1074:19) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/Users/gyq/.orionos-cli/dist/tools/logOutput.js',
        '/Users/gyq/.orionos-cli/dist/index.js',
        '/usr/local/lib/node_modules/orionos-cli/dist/index.js'
      ]
    }
    

    发现和 Orionos-cli 脚手架相关,重新安装 Orionos-cli 脚手架,解决问题

    相关文章

      网友评论

          本文标题:解决Error: Cannot find module 'cha

          本文链接:https://www.haomeiwen.com/subject/kcevyktx.html