I have followed the Angular2 official tutorial https://angular.io/docs/ts/latest/tutorial/toh-pt2.html , and it is now broken. Last time I used it was a few weeks ago, and I got through 7 steps and it worked. Now I see:
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
I have installed TypeScript globally and just updated npm.
Base on error TS2307: Cannot find module '@anguler/core'.
, you may have a typo, try with @angular/core
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.