MEAN script and bootstrap / conversation

I am currently exploring new ways to develop and hit the MEAN stack, which can be found here - http://mean.io/#!/

I installed Mongo, Node (plus npm, etc.) and went through all the steps listed on the website. The problem occurs when I execute grunt (or even Node server.js) and open a web page - the terminal displays the following:

Error: ENOENT, open '/Users/xxx/myApp/bower_components/bootstrap/dist/css/bootstrap.css'

The first problem is that the bower_components directory does not actually exist! I guess this is probably the first point of call, however I'm not quite sure where to start with troubleshooting (I'm new to bower).

Does anyone have any experience with the MEAN stack and / or how to solve a problem with the bootstrap / bower_components directory?

Any help would be appreciated.

Thank you in advance:)

+6
source share
1 answer

It seems that you did not install the gazebo, and as a result, bootstrap through the gazebo was not installed.

Install Bower

$ npm install -g bower 

Install bootstrap through the gazebo

 $ bower install bootstrap 

You can learn more about this on the website. Also look for stand packages here . Since you are using angular, you can download angular-bootstrap.

UPDATE

What is bower provides a package manager for client modules. Like npm, with the difference that npm also provides backend- / nodejs modules.

If you use mean.io , your project will be prepared with a file called bower.json , and another with the name package.json , which defines the dependencies in your project. To install them, start by getting the node.js dependencies:

 $ npm install 

If you want the stand to be installed globally, use:

 $ npm install -g bower 

Then set the dependencies on the histogram

 $ bower install 

And now you should be good to go.

You can also add bower panel manually

or if you want to create your mean project from scratch

Install Bower

 $ npm install -g bower 

Install bootstrap through the gazebo

 $ bower install bootstrap 

Saving Dependencies

If you want to create bower.json to save dependencies:

 $ bower init 

and follow the instructions on the console.

Now that you are installing the new bower packages, you use --save and bower will add the dependency to your bower.json.

 $ bower install bootstrap --save 
+10
source

Source: https://habr.com/ru/post/972586/


All Articles