gpt4 book ai didi

javascript - Angular-quickstart@1.0.0 构建脚本失败 'tsc -p src/'

转载 作者:行者123 更新时间:2023-12-03 04:28:26 24 4
gpt4 key购买 nike

我已经跟着Angular2官方教程https://angular.io/docs/ts/latest/tutorial/toh-pt2.html ,现在已经坏了。我上次使用它是几周前的事,我完成了 7 个步骤,效果很好。现在我明白了:

cchilders:~/tutorials/javascript/angular-2-js/official-tutorial/src (master) 
$ npm start

> angular-quickstart@1.0.0 prestart /home/cchilders/tutorials/javascript/angular-2-js/official-tutorial/src
> npm run build


> angular-quickstart@1.0.0 build /home/cchilders/tutorials/javascript/angular-2-js/official-tutorial/src
> tsc -p src/

src/app/app.component.ts(74,19): error TS1109: Expression expected.
src/app/hero.service.ts(1,28): error TS2307: Cannot find module '@anguler/core'.

npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 build: `tsc -p src/`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 build script 'tsc -p src/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc -p src/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/cchilders/tutorials/javascript/angular-2-js/official-tutorial/src/npm-debug.log

npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 prestart: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 prestart script 'npm run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/cchilders/tutorials/javascript/angular-2-js/official-tutorial/src/npm-debug.log

我已经全局安装了 TypeScript,并且刚刚更新了 npm。

最佳答案

基于错误 TS2307:找不到模块“@anguler/core”。,您可能有拼写错误,请尝试使用 @angular/core

关于javascript - Angular-quickstart@1.0.0 构建脚本失败 'tsc -p src/',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43600838/

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