2016-03-07 53 views
0

jspm init结果:JSMP init命令得到EINVAL错误

Package.json file does not exist, create it? [yes]: 
    err Error: EINVAL, invalid argument 
      at new Socket (net.js:157:18) 
      at process.stdin (node.js:687:19) 
      at MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\ui.js:202:12 
      at lib$rsvp$$internal$$initializePromise (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\rsvp\dist\rsvp.js:1084:9) 
      at new lib$rsvp$promise$$Promise (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\rsvp\dist\rsvp.js:546:53) 
      at Object.exports.input (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\ui.js:190:10) 
      at Object.exports.confirm (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\ui.js:157:15) 
      at Promise.resolve.then.then.config.pjsonPath (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\config.js:70:17) 
      at tryCatchReject (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:1183:30) 
      at runContinuation1 (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:1142:4) 
      at Fulfilled.when (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:930:4) 
      at ContinuationTask.run (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:1040:24) 
      at Scheduler._drain (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:97:19) 
      at Scheduler.drain (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:62:9) 
      at process._tickCallback (node.js:442:13) 
      at Function.Module.runMain (module.js:499:11) 

可能与此有关:https://github.com/jspm/jspm-cli/issues/610

回答

0

貌似这个问题可能与我的Cygwin安装:Node.js Cygwin not supported 也许它不能进入交互式提示。

使用jspm init -y可以工作,但在大多数教程中未提及。