ng2项目报错

早期ng2项目包如下错误

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-quickstart@1.0.0 start: `tsc && concurrently "tsc -w" "lite-server" `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:Userssec-hAppDataRoaming
pm-cache\_logs2018-01-25T08_10_50_041Z-debug.log
PS E:learnangular2-test-learn> npm install
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> uws@0.14.5 install E:learnangular2-test-learn
ode_modulesuws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

参考链接:https://stackoverflow.com/a/43457213/7103689

Change the start field in package.json from:

"start": "tsc && concurrently "npm run tsc:w" "npm run lite" "

To:

"start": "concurrently "npm run tsc:w" "npm run lite" "
原文地址:https://www.cnblogs.com/happen-/p/8351953.html