A
A
Alex102142020-12-17 12:24:57
Angular
Alex10214, 2020-12-17 12:24:57

How to include Bootstrap grid and styles in Angular?

Hello everyone, I get an error when connecting bootstrapa (
I write in the root folder "npm install --save bootstrap". Then I connect it in angular.json like this: "../node_modules/bootstrap/dist/css/bootstrap.min. css"
And I get an error:
ERROR in multi ../node_modules/bootstrap/dist/css/bootstrap.min.css ./src/styles.scss
Module not found: Error: Can't resolve 'C:\Users\ 38093\Desktop\coverLetter\node_modules\bootstrap\dist\css\bootstrap.min.css' in 'C:\Users\38093\Desktop\coverLetter\cover'

What am I doing wrong??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex10214, 2020-12-17
@Alex10214

I managed to solve this problem in this way. I just rewrote the line in angular.json to this:

{"input": "./node_modules/bootstrap/dist/css/bootstrap.min.css"},

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question