An unhandled exception occurred: The ../node_modules/bootstrap/dist/css/bootstrap.min.css asset path

前言

学习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! [email protected] start: `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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/[email protected]

在这里插入图片描述

祝你幸福
送你一首歌:
附图:《此食此客》第二集(厦门) 连载…
在这里插入图片描述

发布了81 篇原创文章 · 获赞 111 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/HezhezhiyuLe/article/details/99575197