0

I need to install the bootstrap module in a new Angular project.

npm install save --bootstrap

Output is below and the bootstrap module is not installed in the node_modules.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ [email protected]
updated 1 package and audited 1467 packages in 5.145s

55 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

The previous successful installation indicated at least 10+ packages should be added. But above output indicated just 1 package updated?

Can someone help to solve the problem?

1 Answer 1

1

this is how I install it:

npm install bootstrap jquery popper.js --save-dev

then edit angular.json

"./node_modules/bootstrap/dist/css/bootstrap.min.css"

and

"./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
Sign up to request clarification or add additional context in comments.

5 Comments

Incredible! Again, this error is hurting me all day: $ ng add @ng-bootstrap/ng-bootstrap Unable to find compatible package. Using 'latest'. Package has unmet peer dependencies. Adding the package may not succeed. Installing packages for tooling via npm. Installed packages for tooling via npm. An unhandled exception occurred: Cannot find module '@schematics/angular/utility/project'
are you sure you cd'd to your project folder?
Yes, positive. I also confirm the bootstrap module is installed and angular.json is updated before installing the ng-bootstrap. Very odd...
so what worked? 3 comments saying it didn't work, and then check the "solution" button?
Your post works for bootstrap installation. If you look closer, the fatal issue is ng-bootstrap installation. Please see my post: https://stackoverflow.com/questions/62587172/angular-install-ng-bootstrap-cannot-find-module-schematics-angular-utility-pr/62601614#62601614. https://github.com/ng-bootstrap/ng-bootstrap/issues/3788. And I appreciate your prompt response!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.