Angular4 npm start 不再是 运行
Angular4 npm start not running anymore
我在更新到 angular4 后遇到了一些问题。当我尝试 运行 npm start 时,我会收到此错误。我尝试更新 npm 并重新安装所有软件包。我错过了什么?
我正在使用:npm@4.1.2 和 node@v7.5.0 以及 tsc 2.2.1。
0 info it worked if it ends with ok
1 verbose cli [ 'c:\Program Files (x86)\nodejs\node.exe',
1 verbose cli 'C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@4.1.2
3 info using node@v7.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular-quickstart@1.0.0~prestart: angular-quickstart@1.0.0
6 verbose lifecycle angular-quickstart@1.0.0~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle angular-quickstart@1.0.0~prestart: PATH: C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;h:\Dev\it-food-delivery-web\source\node_modules\.bin;c:\Users\Carlo\bin;.;C:\Program Files (x86)\Git\local\bin;C:\Program Files (x86)\Git\mingw\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\bin;c:\Python27\;c:\Python27\Scripts;c:\ProgramData\Oracle\Java\javapath;c:\Ruby22\bin;c:\Program Files (x86)\Lenovo\FusionEngine;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\Git\cmd;c:\Program Files\OpenVPN\bin;c:\xampp\php;c:\ProgramData\ComposerSetup\bin;c:\Users\Carlo\.dnx\bin;c:\Program Files\Microsoft DNX\Dnvm\;c:\Program Files\Microsoft SQL Server0\Tools\Binn\;c:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Skype\Phone\;c:\Program Files (x86)\PostgreSQL.4\bin;c:\Program Files (x86)\PostgreSQL.4\lib;c:\Program Files (x86)\Windows Live\Shared;c:\Program Files\Microsoft SQL Server0\Tools\Binn\;c:\Program Files (x86)\Windows Kits\Windows Performance Toolkit\;c:\Program Files\dotnet\;c:\Program Files\Git\cmd;c:\Program Files (x86)\Microsoft SQL Server0\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server0\Tools\Binn\;c:\Program Files\Microsoft SQL Server0\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server0\DTS\Binn\;c:\Program Files (x86)\nodejs\;h:\Dev;c:\Users\Carlo\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin;c:\Users\Carlo\.k\runtimes\kre-clr-win-x86.1.0.0-beta3\bin;c:\Users\Carlo\.k\bin;c:\Users\Carlo\.dnx\bin;c:\Users\Carlo\AppData\Local\Pandoc\;c:\Program Files (x86)\Microsoft VS Code\bin;c:\Program Files\Docker Toolbox;c:\Users\Carlo\AppData\Roaming\Composer\vendor\bin;c:\Users\Carlo\AppData\Local\Microsoft\WindowsApps;c:\Program Files (x86)\GnuWin32\bin;c:\Users\Carlo\AppData\Roaming\npm
8 verbose lifecycle angular-quickstart@1.0.0~prestart: CWD: h:\Dev\it-food-delivery-web\source
9 silly lifecycle angular-quickstart@1.0.0~prestart: Args: [ '/d /s /c', 'npm run build' ]
10 silly lifecycle angular-quickstart@1.0.0~prestart: Returned: code: 2 signal: null
11 info lifecycle angular-quickstart@1.0.0~prestart: Failed to exec prestart script
12 verbose stack Error: angular-quickstart@1.0.0 prestart: `npm run build`
12 verbose stack Exit status 2
12 verbose stack at EventEmitter.<anonymous> (C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at EventEmitter.emit (events.js:192:7)
12 verbose stack at ChildProcess.<anonymous> (C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at ChildProcess.emit (events.js:192:7)
12 verbose stack at maybeClose (internal/child_process.js:890:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13 verbose pkgid angular-quickstart@1.0.0
14 verbose cwd h:\Dev\it-food-delivery-web\source
15 error Windows_NT 10.0.14393
16 error argv "c:\Program Files (x86)\nodejs\node.exe" "C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
17 error node v7.5.0
18 error npm v4.1.2
19 error code ELIFECYCLE
20 error angular-quickstart@1.0.0 prestart: `npm run build`
20 error Exit status 2
21 error Failed at the angular-quickstart@1.0.0 prestart script 'npm run build'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the angular-quickstart package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error npm run build
21 error You can get information on how to open an issue for this project with:
21 error npm bugs angular-quickstart
21 error Or if that isn't available, you can get their info via:
21 error npm owner ls angular-quickstart
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]
已找到解决方案。
我运行命令:tsc -p src/
我的代码正在导入
import {isPresent} from '@angular/compiler/src/facade/lang';
我删除了未使用的线路,现在可以使用了
我在更新到 angular4 后遇到了一些问题。当我尝试 运行 npm start 时,我会收到此错误。我尝试更新 npm 并重新安装所有软件包。我错过了什么?
我正在使用:npm@4.1.2 和 node@v7.5.0 以及 tsc 2.2.1。
0 info it worked if it ends with ok
1 verbose cli [ 'c:\Program Files (x86)\nodejs\node.exe',
1 verbose cli 'C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@4.1.2
3 info using node@v7.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular-quickstart@1.0.0~prestart: angular-quickstart@1.0.0
6 verbose lifecycle angular-quickstart@1.0.0~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle angular-quickstart@1.0.0~prestart: PATH: C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;h:\Dev\it-food-delivery-web\source\node_modules\.bin;c:\Users\Carlo\bin;.;C:\Program Files (x86)\Git\local\bin;C:\Program Files (x86)\Git\mingw\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\bin;c:\Python27\;c:\Python27\Scripts;c:\ProgramData\Oracle\Java\javapath;c:\Ruby22\bin;c:\Program Files (x86)\Lenovo\FusionEngine;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\Git\cmd;c:\Program Files\OpenVPN\bin;c:\xampp\php;c:\ProgramData\ComposerSetup\bin;c:\Users\Carlo\.dnx\bin;c:\Program Files\Microsoft DNX\Dnvm\;c:\Program Files\Microsoft SQL Server0\Tools\Binn\;c:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Skype\Phone\;c:\Program Files (x86)\PostgreSQL.4\bin;c:\Program Files (x86)\PostgreSQL.4\lib;c:\Program Files (x86)\Windows Live\Shared;c:\Program Files\Microsoft SQL Server0\Tools\Binn\;c:\Program Files (x86)\Windows Kits\Windows Performance Toolkit\;c:\Program Files\dotnet\;c:\Program Files\Git\cmd;c:\Program Files (x86)\Microsoft SQL Server0\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server0\Tools\Binn\;c:\Program Files\Microsoft SQL Server0\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server0\DTS\Binn\;c:\Program Files (x86)\nodejs\;h:\Dev;c:\Users\Carlo\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin;c:\Users\Carlo\.k\runtimes\kre-clr-win-x86.1.0.0-beta3\bin;c:\Users\Carlo\.k\bin;c:\Users\Carlo\.dnx\bin;c:\Users\Carlo\AppData\Local\Pandoc\;c:\Program Files (x86)\Microsoft VS Code\bin;c:\Program Files\Docker Toolbox;c:\Users\Carlo\AppData\Roaming\Composer\vendor\bin;c:\Users\Carlo\AppData\Local\Microsoft\WindowsApps;c:\Program Files (x86)\GnuWin32\bin;c:\Users\Carlo\AppData\Roaming\npm
8 verbose lifecycle angular-quickstart@1.0.0~prestart: CWD: h:\Dev\it-food-delivery-web\source
9 silly lifecycle angular-quickstart@1.0.0~prestart: Args: [ '/d /s /c', 'npm run build' ]
10 silly lifecycle angular-quickstart@1.0.0~prestart: Returned: code: 2 signal: null
11 info lifecycle angular-quickstart@1.0.0~prestart: Failed to exec prestart script
12 verbose stack Error: angular-quickstart@1.0.0 prestart: `npm run build`
12 verbose stack Exit status 2
12 verbose stack at EventEmitter.<anonymous> (C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at EventEmitter.emit (events.js:192:7)
12 verbose stack at ChildProcess.<anonymous> (C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at ChildProcess.emit (events.js:192:7)
12 verbose stack at maybeClose (internal/child_process.js:890:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13 verbose pkgid angular-quickstart@1.0.0
14 verbose cwd h:\Dev\it-food-delivery-web\source
15 error Windows_NT 10.0.14393
16 error argv "c:\Program Files (x86)\nodejs\node.exe" "C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
17 error node v7.5.0
18 error npm v4.1.2
19 error code ELIFECYCLE
20 error angular-quickstart@1.0.0 prestart: `npm run build`
20 error Exit status 2
21 error Failed at the angular-quickstart@1.0.0 prestart script 'npm run build'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the angular-quickstart package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error npm run build
21 error You can get information on how to open an issue for this project with:
21 error npm bugs angular-quickstart
21 error Or if that isn't available, you can get their info via:
21 error npm owner ls angular-quickstart
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]
已找到解决方案。
我运行命令:tsc -p src/
我的代码正在导入
import {isPresent} from '@angular/compiler/src/facade/lang';
我删除了未使用的线路,现在可以使用了