为什么同时给出错误而不是运行,请解决我的问题?

时间:2020-10-13 10:43:28

标签: reactjs npm json-server concurrently

我正在执行concurrently "npm start" "npm run json-server"

它向我展示了这个

[0] Error occurred when executing command: npm start
[0] Error: spawn cmd.exe ENOENT
[0]     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
[0]     at onErrorNT (internal/child_process.js:467:16)
[0]     at processTicksAndRejections (internal/process/task_queues.js:84:21)
[1] Error occurred when executing command: npm run json-server
[1] Error: spawn cmd.exe ENOENT
[1]     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
[1]     at onErrorNT (internal/child_process.js:467:16)
[1]     at processTicksAndRejections (internal/process/task_queues.js:84:21)
[1] npm run json-server exited with code -4058
[0] npm start exited with code -4058

当我仅运行concurrently时,会出现此错误:

PS F:\Web Development Work\My Projects\Nabiha Photostate App\data> concurrently
assert.js:101
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: [concurrently] no commands provided
    at module.exports (C:\Users\N2SPARTAN\AppData\Roaming\npm\node_modules\concurrently\src\concurrently.js:24:12)
    at module.exports (C:\Users\N2SPARTAN\AppData\Roaming\npm\node_modules\concurrently\index.js:21:12)
    at Object.<anonymous> (C:\Users\N2SPARTAN\AppData\Roaming\npm\node_modules\concurrently\bin\concurrently.js:148:1)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: 0,
  expected: 0,
  operator: 'notStrictEqual'
}

0 个答案:

没有答案