当我运行“npm start”时,我正在 Angular 2 中尝试 Hello World,但它不起作用。我在 package.json 的脚本中定义了 start 但 start 不起作用
这是我的 package.json 设置
{
"name": "ng2-helloworld",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\"",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings",
"postinstall": "typing install"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"concurrently": "^3.4.0",
"lite-server": "^2.3.0",
"typescript": "^2.2.2",
"typings": "^2.1.1"
}
}
这是我的 tsconfig.json 设置
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "none",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"lib": ["es2015", "dom"]
}
}