npm ERR!在[email protected]启动脚本'tsc &&并发“ tsc -w”“ lite-server”失败

蒙娜·贾拉(Mona Jalal)

我根据本教程修改了app / main.ts ,当我“ npm start”时,出现以下错误:

这是带有提交消息的项目文件errorhttps : //github.com/monajalal/angular2_projects

import {bootstrap}    from '@angular/platform-browser-dynamic';
import {AppComponent} from '@angular/core'

@Component({
    selector: 'my-app',
    template: '<h1>Ultra Racing</h1>'

})
class AppComponent{}
bootstrap(AppComponent);

错误:

Monas-MacBook-Pro:my-proj mona$ npm start

> [email protected] start /Users/mona/angular/my-proj
> tsc && concurrently "tsc -w" "lite-server" 

app/app.component.ts(5,25): error TS1005: ',' expected.
app/app.component.ts(5,27): error TS1005: ':' expected.
app/app.component.ts(5,33): error TS1005: ',' expected.
app/app.component.ts(5,41): error TS1005: ':' expected.
app/app.component.ts(5,43): error TS1005: ',' expected.
app/app.component.ts(5,47): error TS1139: Type parameter declaration expected.
app/app.component.ts(5,52): error TS1002: Unterminated string literal.
app/app.component.ts(6,1): error TS1005: ',' expected.

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.8.0
npm ERR! npm  v3.8.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `tsc && concurrently "tsc -w" "lite-server" `
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "tsc -w" "lite-server" '.
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 angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc && concurrently "tsc -w" "lite-server" 
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 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!     /Users/mona/angular/my-proj/npm-debug.log
蒙娜·贾拉(Mona Jalal)

我修改了app/app.component.ts:从'@ angular / core'导入{Component};

@Component({
    selector: 'my-app',
    template: "<h1>Mona's first Angular 2 App</h1>"
})
export class AppComponent { }

这是由于'蒙娜娜(Mona)之后,我不得不使用“来修复它。Angular Gitter Channel的Google的” Rob Wormald“告诉我。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Angular 2 Beta“ npm run tsc”命令失败

来自分类Dev

npm start-tsc -w以代码126退出

来自分类Dev

角度2 tsc错误

来自分类Dev

npm:启动脚本失败

来自分类Dev

带有Angular2的MVC Core:MSB6006“ tsc.exe”退出,代码为1

来自分类Dev

使用tsc -w在文件更改后运行browserify

来自分类Dev

有没有一种方法可以使用npm脚本运行tsc -watch && nodemon --watch?

来自分类Dev

执行命令时发生错误: lite-server 而 npm start 命令用于 Angular2

来自分类Dev

tsc:1:达到最大嵌套功能级别;增加功能?

来自分类Dev

tsc 编译导入路径错误,在@angular/material 末尾添加索引

来自分类Dev

sh:1:并发:在npm启动时找不到

来自分类Dev

打字稿TSC命令行-防止观看TSC

来自分类Dev

打字稿TSC命令行-防止观看TSC

来自分类Dev

tsc out创建空的outfile

来自分类Dev

TSC之后静态成员失踪

来自分类Dev

TSC之后静态成员失踪

来自分类Dev

tsc无法识别'--init'选项

来自分类Dev

程序“ tsc”运行失败:此应用程序未与指定文件关联

来自分类Dev

上载测试文件时如何修复tsc-watch重新启动?

来自分类Dev

使用ASP.net 4 MVC时,代码1退出了“ tsc.exe”

来自分类Dev

运行ng e2e时dist / out-tsc-e2e在哪里?

来自分类Dev

无法使用TSC编译的生成版本

来自分类Dev

tsc未知编译器选项allowNonTsExtensions

来自分类Dev

在tsm中将tsconfig.json用于tsc

来自分类Dev

打字稿tsc --version仍为0.9.5

来自分类Dev

从Windows命令行运行tsc

来自分类Dev

“ tsc.exe”以代码255退出

来自分类Dev

tsc不创建dist文件夹

来自分类Dev

tsc命令未编译到outDir