启动项目报错,找不到模块 coa/compile.js

启动项目报错:

Exit code: 1
Command: start /B node compile.js & node compile.js
Arguments: 
Directory: uber-web/node_modules/coa
Output:
/bin/sh: 1: start: not found
internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'uber-web/node_modules/coa/compile.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {

解决办法:
在package.json文件中添加:

"coa": "2.0.2"

删除node_modules,重新npm i --legacy-peer-deps,再运行即可

你可能感兴趣的:(javascript)