前言
学习angular引入BS,JQ时,运行报错
An unhandled exception occurred: The ../node_modules/bootstrap/dist/css/bootstrap.min.css asset path must start with the project source root.
See "C:\Users\19686\AppData\Local\Temp\ng-Q4JaZw\angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! auction@0.0.0 start: `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the auction@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\19686\AppData\Roaming\npm-cache\_logs\2019-08-14T06_04_39_146Z-debug.log
原因
这是因为你的Angular版本太高
解决
随便换一个旧版,我换的,1.7.4
使用新版NodeJS执行就行
npm install -g @angular/cli@1.7.4
祝你幸福
送你一首歌:
附图:《此食此客》第二集(厦门) 连载…