3 回答
TA贡献1856条经验 获得超5个赞
从以下位置更改startpackage.json中的字段
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" "
至
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" "
TA贡献1845条经验 获得超8个赞
为了npm start
为我运行,我必须确保已全局安装了一些devDependencies。你有没有尝试过:
npm install -g concurrently
npm install -g lite-server
npm install -g typescript
TA贡献1794条经验 获得超8个赞
首先,您需要更新npm,lite-server和打字稿:
sudo npm update -g && sudo npm install -g concurrently lite-server typescript
从Angular项目目录中删除node_modules文件夹(如果存在)。下一轮:
npm install
之后,解决ENOSPC错误:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
最后:
npm start
这是我的package.json文件:
{
"name": "reservationsystem",
"version": "0.0.1",
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
},
"dependencies": {
"a2-in-memory-web-api": "~0.1.0",
"angular2": "2.0.0-beta.3",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"systemjs": "0.19.17",
"zone.js": "0.5.11"
},
"devDependencies": {
"concurrently": "^1.0.0",
"lite-server": "^2.0.1",
"typescript": "^1.7.5"
}
}
- 3 回答
- 0 关注
- 926 浏览
添加回答
举报