Search code examples
angularangular-ui-bootstrapnode-modulesnpm-install

Angular `npm install save --bootstrap` doesn't install bootstrap module


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?


Solution

  • 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"