dvajs / dva-cli

The dva command line utility.
964 stars 156 forks source link

dva new demo throw "Error: spawn EACCES" #111

Closed lifengzhai closed 7 years ago

lifengzhai commented 7 years ago
➜  react dva new demo
/usr/local/lib/node_modules/dva-cli/bin/dva-new
internal/child_process.js:325
    throw errnoException(err, 'spawn');
    ^

Error: spawn EACCES
    at exports._errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:493:9)
    at spawn (/usr/local/lib/node_modules/dva-cli/node_modules/win-spawn/index.js:54:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/dva-cli/bin/dva:33:10)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
jbiter commented 7 years ago

我这儿也是

sorrycc commented 7 years ago

权限问题?手动执行 /usr/local/lib/node_modules/dva-cli/bin/dva-new demo 试试?

jbiter commented 7 years ago

好像还是不行

$ /Users/Jason/.nvm/versions/node/v8.4.0/bin/dva new demo
/Users/Jason/.nvm/versions/node/v8.4.0/lib/node_modules/dva-cli/bin/dva-new
internal/child_process.js:325
    throw errnoException(err, 'spawn');
    ^

Error: spawn EACCES
    at _errnoException (util.js:1041:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:493:9)
    at spawn (/Users/Jason/.nvm/versions/node/v8.4.0/lib/node_modules/dva-cli/node_modules/win-spawn/index.js:54:10)
    at Object.<anonymous> (/Users/Jason/.nvm/versions/node/v8.4.0/lib/node_modules/dva-cli/bin/dva:33:10)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
sorrycc commented 7 years ago

image

刚安装了最新的 dva-cli 并创建项目,没发现问题。检查下权限或者环境等原因吧。