[英]I am getting this error when i try to add bootstrap in my Angular project
I tried using following command too,我也尝试使用以下命令,
ng add @ng-bootstrap/ng-bootstrap -- force
It didnt worked, so i deleted both node_modules and package-lock.json files.它没有用,所以我删除了node_modules和package-lock.json文件。 I reinstalled it using following command.
我使用以下命令重新安装了它。
npm install --legacy-peer-deps
Still i am having the same problem.我仍然有同样的问题。 Anyone have an idea?
有人有想法吗?
I was following a tutorial, thats why i had to use those commands.我正在学习一个教程,这就是我必须使用这些命令的原因。 insted i used this.
我用这个。
npm install bootstrap --save
npm install bootstrap --save
@import "~bootstrap/dist/css/bootstrap.css";
@import "~bootstrap/dist/css/bootstrap.css";
You simpley do
npm install bootstrap
and then map the respected soure location into your angular.json file
"scripts": [
"./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
],
"styles": [
"styles.css","./node_modules/bootstrap/dist/css/bootstrap.min.css"
]
And restart your app
or
You can try with ngx also
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.