我試圖運行first basic example of AngularJS 2 但是當我嘗試運行(我的文件夾項目中NPM開始)的應用程序,我已經得到了以下錯誤消息:AngularJS 2:運行(非常)基本的應用程序
[email protected] start /home/waterbed/xxxy
tsc && concurrently "npm run tsc:w" "npm run lite"
app/app.component.ts(3,10): error TS2305: Module '"/home/waterbed/xxxy/app/app.component"' has no exported member 'AppComponent'.
app/main.ts(2,27): error TS2307: Cannot find module './app.module'.
npm ERR! Linux 3.16.0-4-586
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
npm ERR! This is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/waterbed/xxxy/npm-debug.log
錯誤消息似乎很明顯,但谷歌的指南從未提及創建app.module。
樹./app返回:
app/
├── app.component.js
├── app.component.js.map
├── app.component.ts
├── app.modules.js
├── app.modules.js.map
├── app.modules.ts
├── main.js
├── main.js.map
└── main.ts
更何況,我是新來AngularJS,無論我們談論的版本,我幾乎新NPM,的NodeJS,...
能否請您分享'app.modules.ts'和'app.component.ts'? – Sanket