JSMP init命令获取einval错误

时间:2016-03-07 14:57:09

标签: npm cygwin jspm

jspm init导致:

  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

1 个答案:

答案 0 :(得分:0)

看起来这个问题可能与我的cygwin安装有关:Node.js Cygwin not supported 也许它无法进入交互式提示。

使用jspm init -y有效,但大多数教程都没有提及。