gpt4 book ai didi

ubuntu - Angular2 Quickstart gulp错误

转载 作者:太空狗 更新时间:2023-10-29 17:37:27 26 4
gpt4 key购买 nike

我正在尝试启动并运行 angular2 quickstart 应用程序,但在运行 gulp 命令时遇到错误。

我有 ubuntu 15.04。我安装了 nodejs v0.10.25 和 npm 1.4.21。我还安装了 gulp v3.9.0。我使用

克隆了最新的 angular2/quickstart

git clone https://github.com/angular/quickstart.git hello2ng2

然后我进入 hello2ng2 文件夹并发出以下命令

npm install

然后我发出以下命令来构建快速启动应用

gulp

我遇到了以下错误...不知道如何解决。寻求帮助。

[12:38:46] Starting 'default'...
[12:38:46] Starting 'clean'...
[12:38:46] Finished 'clean' after 13 ms
[12:38:46] Starting 'build:ng2'...
npm WARN package.json angular2@2.0.0-alpha.30 No repository field.
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.
npm WARN package.json angular2@2.0.0-alpha.30 No repository field.
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/usernm/angulartest/helloworld/hello2ng2/node_modules/angular2/es6/prod/angular2.api.map'
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/usernm/angulartest/helloworld/hello2ng2/node_modules/rtts_assert/es6/es5build.map'
[12:38:54] 'build:ng2' errored after 7.5 s
[12:38:54] Error in plugin 'gulp-shell'
Message:
Command failed: npm WARN package.json angular2@2.0.0-alpha.30 No repository field.
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.
npm WARN package.json angular2@2.0.0-alpha.30 No repository field.
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/usernm/angulartest/helloworld/hello2ng2/node_modules/angular2/es6/prod/angular2.api.map'
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/usernm/angulartest/helloworld/hello2ng2/node_modules/rtts_assert/es6/es5build.map'

Details:
killed: false
code: 8
signal: null
stdout:
stderr: npm WARN package.json angular2@2.0.0-alpha.30 No repository field.
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.
npm WARN package.json angular2@2.0.0-alpha.30 No repository field.
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/usernm/angulartest/helloworld/hello2ng2/node_modules/angular2/es6/prod/angular2.api.map'
npm WARN package.json rtts_assert@2.0.0-alpha.30 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/usernm/angulartest/helloworld/hello2ng2/node_modules/rtts_assert/es6/es5build.map'

[12:38:54] 'default' errored after 7.52 s
[12:38:54] Error: [object Object]
at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.EventEmitter.emit (events.js:117:20)
at Gulp.Orchestrator._emitTaskDone (/home/usernm/angulartest/helloworld/hello2ng2/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /home/usernm/angulartest/helloworld/hello2ng2/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/home/usernm/angulartest/helloworld/hello2ng2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/home/usernm/angulartest/helloworld/hello2ng2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/home/usernm/angulartest/helloworld/hello2ng2/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/home/usernm/angulartest/helloworld/hello2ng2/node_modules/run-sequence/index.js:60:4)
at Gulp.EventEmitter.emit (events.js:117:20)

最佳答案

我遇到了类似的问题。本教程没有(或者至少在我写这篇文章时没有)提到所需的最低节点版本。安装最新的 node/npm,然后再试一次。

而且最新的教程比你写这篇文章时有了很大的改进,但它仍然没有指出所需的节点版本。更新节点后,我强烈建议查看新的 tutorial .我确实就此项目向 Google 提供了一些反馈,希望很快就会出现。

关于ubuntu - Angular2 Quickstart gulp错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31302533/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com