0
我遵循了Angular2官方教程https://angular.io/docs/ts/latest/tutorial/toh-pt2.html,現在它已被破壞。上次我使用它是幾個星期前,我通過了7個步驟,它的工作。現在我看到:在[email protected]構建腳本失敗'tsc -p src /'
cchilders:~/tutorials/javascript/angular-2-js/official-tutorial/src (master)
$ npm start
> [email protected] prestart /home/cchilders/tutorials/javascript/angular-2-js/official-tutorial/src
> npm run build
> [email protected] 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! [email protected] build: `tsc -p src/`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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! [email protected] prestart: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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。
哦大聲笑,因爲某種原因,我一直錯誤的角度這種方式。奇怪的。謝謝 – codyc4321