0

我已经完成了一些问题npm run watch:<platform>

$ npm install -g @vue/cli @vue/cli-init

$ vue init nativescript-vue/vue-cli-template

$ cd 项目名称

$ npm 安装

对于下一步,我有这个:```λ npm run watch:android

test-vue-native@1.0.0 watch:android C:\git\test-vue-native

npm run watch -- --env.android

test-vue-native@1.0.0 watch C:\git\test-vue-native webpack --watch --env.tnsAction run "--env.android"

info:将 NativeScript 插件复制到模板依赖项... info:从模板准备 NativeScript 应用程序... npm WARN test-vue-native@ 没有存储库字段。

信息:Android 的捆绑应用程序...

Webpack 正在查看文件...</p>

line=961,method=null,native=false,column=11,file=internal/child_process.js,function=Socket.stream.socket.on,line=380,method=on,native=false,column=13, file=events.js,function=Socket.emit,line=182,method=emit,native=false,column=12,file=net.js,function=Pipe._handle.close,line=598,method=close, native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess.exithandler (child_process.js:291:12), at ChildProcess.emit (events.js:182:13), at可能关闭 (internal/child_process.js:961:16),在 Socket.stream.socket.on (internal/child_process.js:380:11),在 Socket.emit (events.js:182:13),在管道。 _handle.close (net.js:598:12)] npm 错误!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:function=Socket.stream.socket.on, line=380, method=on, native=false, column=13, file=events.js, function=Socket.emit, line=182, method=emit, native=false, column=12, file=net.js, function=Pipe._handle.close, line=598, method=close, native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess。 exithandler (child_process.js:291:12),在 ChildProcess.emit (events.js:182:13),在maybeClose (internal/child_process.js:961:16),在 Socket.stream.socket.on (internal/ child_process.js:380:11),在 Socket.emit (events.js:182:13),在 Pipe._handle.close (net.js:598:12)] npm 错误!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:function=Socket.stream.socket.on, line=380, method=on, native=false, column=13, file=events.js, function=Socket.emit, line=182, method=emit, native=false, column=12, file=net.js, function=Pipe._handle.close, line=598, method=close, native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess。 exithandler (child_process.js:291:12),在 ChildProcess.emit (events.js:182:13),在maybeClose (internal/child_process.js:961:16),在 Socket.stream.socket.on (internal/ child_process.js:380:11),在 Socket.emit (events.js:182:13),在 Pipe._handle.close (net.js:598:12)] npm 错误!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:js, function=Pipe._handle.close, line=598, method=close, native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess.exithandler (child_process.js:291: 12), 在 ChildProcess.emit (events.js:182:13), 在maybeClose (internal/child_process.js:961:16), 在 Socket.stream.socket.on (internal/child_process.js:380:11) ,在 Socket.emit (events.js:182:13),在 Pipe._handle.close (net.js:598:12)] npm ERR!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:js, function=Pipe._handle.close, line=598, method=close, native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess.exithandler (child_process.js:291: 12), 在 ChildProcess.emit (events.js:182:13), 在maybeClose (internal/child_process.js:961:16), 在 Socket.stream.socket.on (internal/child_process.js:380:11) ,在 Socket.emit (events.js:182:13),在 Pipe._handle.close (net.js:598:12)] npm ERR!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:on (internal/child_process.js:380:11), at Socket.emit (events.js:182:13), at Pipe._handle.close (net.js:598:12)] npm ERR!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:on (internal/child_process.js:380:11), at Socket.emit (events.js:182:13), at Pipe._handle.close (net.js:598:12)] npm ERR!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 观看:webpack --watch --env.tnsAction run "--env.android" npm 错误!退出状态 1 npm ERR!npm 错误!在 test-vue-native@1.0.0 监视脚本中失败。npm 错误!这可能不是 npm 的问题。上面可能有额外的日志输出。

npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!C:\Users\gvolkov\AppData\Roaming\npm-cache_logs\2018-07-09T15_04_18_803Z-debug.log npm ERR!代码 ELIFECYCLE npm 错误!errno 1 npm 错误!test-vue-native@1.0.0 watch:android: npm run watch -- --env.android npm ERR!退出状态 1 npm ERR!npm 错误!在 test-vue-native@1.0.0 watch:android 脚本中失败。npm 错误!这可能不是 npm 的问题。上面可能有额外的日志输出。

npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!C:\Users\gvolkov\AppData\Roaming\npm-cache_logs\2018-07-09T15_04_18_856Z-debug.log```

什么可以帮助我?

PS:我用的是windows x64

4

1 回答 1

0

“NativeScript 高级设置:Windows”帮助我 https://docs.nativescript.org/start/ns-setup-win

于 2018-07-10T06:52:54.033 回答