1

当我尝试在 Angular 2 项目中调用 npm start 时遇到问题。控制台显示:

$ npm 开始

angular-quickstart@1.0.0 prestart C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp npm run build

angular-quickstart@1.0.0 build C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp tsc -p src/

**error TS5023: Unknown compiler option 'moduleResolution'.**

**error TS5023: Unknown compiler option 'lib'.**

npm ERR! Windows_NT 10.0.14393

npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"

npm ERR! node v6.10.1

npm ERR! npm  v3.10.10

npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 build: `tsc -p src/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 build script 'tsc -p src/'.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc -p src/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp\npm-debug.log

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 prestart: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 prestart script 'npm run build'.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

npm ERR!     C:\Users\Jan\Desktop\Study\ZTW lab\Ang\myApp\npm-debug.log

任何想法?

这很奇怪,因为 2 天前一切正常。我基于 QuickStart 创建了一个新项目。我打电话给 npm install 和 npm start,我正在处理项目。今天不幸的是 npm start 不起作用,我收到此错误:/ 感谢提前提供帮助。

4

0 回答 0