Can't install bootstrap using npm - node.js

I can't install bootstrap using node package manager console.
There are some errors showing in the console.
Can I use only a CDN to my website or is it required to install bootstrap by npm?.

You are trying to install bootstrap inside a directory named bootstrap that is why it gave you this error. just change directory name and install it

"Did you name your project the same as the dependency you're installing?"
Fix would be renaming your project folder from bootstrap-3.3.7 to any.

change the parent directory and then install.
and better start using Bootstrap 4. It is new and much better.

Related

NPM not installing node module

I have an angular project that comes with a package.json file and all the dependencies listed within, but each time I run "npm install", in the terminal, the packages appear to be downloading properly and a node module folder is created in my root folder, but at a certain stage the installation stops without an error message and the generated node module folder disappear from my project. please what do I do?
I can't reproduce your situation, somehow this may not fitable for you.
But I suggest re-install node.js to make sure npm install work correctly.
This link will help to find what version of node.js for you, based on you angular version.
Compatibility list for Angular/Angular-CLI and Node.js
Also, It would be good to manage node.js via NVM(Node Version Manager).

error after installing bootstrap in an existing vue project

I have an existing Vue project and I want to add Boostrap into it. I ran this command (following this tutorial)
npm install bootstrap jquery popper.js
And then, I got an error in the Vue project.
./node_modules/core-js/modules/es.array.iterator.js module build failed: error: enoent: no such file or directory
I have tried deleting node_modules folder and package-lock.json then running npm install, but it didn't work. I also have tried to clear cache but it didn't work. I also have tried running npm install from my cmd but it didn't work as well.
Any other suggestions? Thanks!
Which version of vue are you using (2, 3)? Have you considered using Bootstrap Vue?
I just did the same method a few hours later and it succeeded. I think probably it also depends on your Internet connection.

Bootstrap don't create node moduel folder via npm

I'm a beginner. I'm studying bootstrap, but when i'm trying install bootstrap via nodejs, the terminal annouced to me installing was successed, but node js don't create the node moduel folder in my project, so where is the node moduel folder? And how to create the node moduel in my project??
My english english!, i'm so sorry because of that
anyone can help me pls!
enter image description here
I would suggest creating a package.json file to keep track of the dependencies that you install.
even after running npm install bootstrap it shows a warning to create the package.json file. and bunch of other warnings about peer dependencies needed for the bootstrap such as jquery.
One of the reason that your node_module is missing might be the version of the NodeJS that you are using.
Other one can be running out of resources to needed to complete the installation such as RAM. there is something similar here.

Installing and Using Node JS in My Project

Im very very new in NodeJS
I want to ask about installing and using it in my Project..
I've installed nodejs in my Windows, but I have no idea how to make it works in my Cordova/Phonegap Project. I want to install this module in my project node-gcm. it said I just have to execute npm install node-gcm --save but I dont know where should I execute that command so I tried executed it on my project root (/www). After that I tried the example application code to use it but It said that require is not defined. Can anyone tell me how to fix this?
You need to learn nodejs properly to use in your project. I would recommend the below site could be a good starting point for you which covers all the basics.
http://www.tutorialspoint.com/nodejs/
You are getting that error because, when you look at the package.json file of the node-gcm package, you will notice the dependencies mentioned as,
If you are a windows user, you need to get into your node_modules directory by giving cd node_modules command in your command line and then just issue this command npm install which will install all the required packages.
Hope this helps!.

Can't build my web application when integrating bootstrap template

I'm totally new to Node.js meteor and all development outside of visual studio.
When I go in the console and add bootstrap like this :
npm install twitter-bootstrap
It gets installed and adds all the bootstrap files in my solution but when I run my application with meteor it says
Process finished with exit code 254
No more information. No errors. If I delete all the bootstrap files, it builds and run just fine. Any idea what might be causing this?
I've tried looking for the exit code meaning but I can't find it for my IDE and I'm a bit clueless as for why simply adding those packages without even referencing them anywhere in the project might cause my application not to run at all.
You can't add npm packages in your project folder like that. It will create a node_modules sub-directory that meteor will treat like any other project folder, i.e., it will interpret all the files in it. That's not what you want. Either do the npm install in a super-directory, or, better yet, use the meteor meteorhacks:npm package (https://atmospherejs.com/meteorhacks/npm):
meteor add meteorhacks:npm
and then add the npm dependency to your packages.json file.
{
"twitter-bootstrap": "2.1.1"
}
But the real question is: why do you need this package? bootstrap3 is already part of the standard meteor packages, i.e., you already have full access to bootstrap, incl. javascript.
You can use atmosphere meteor packages called mizzao:bootstrap-3 by running the commend
meteor add mizzoa:bootstrap-3
Alternatively if you want to use npm packages you must add meteorhacks:npm packages.
meteor add meteorhacks:npm
npm install twitter-bootstrap
You can specify all the required npm packages inside a packages.json file.
{
"gm":"1.16.0",
"twitter":"0.2.12",
"twitter-bootstrap":"2.1.1",
}

Resources