bootstrap npm installation dependecies error in npm - npm

This is what I am getting when I am trying to install Bootstrap in my machine with npm:
This is what I am getting when I installed latest jquery and popper.js:

The Bootstrap npm module has a dependency on jQuery and popper.js npm modules.
In case you pull the Bootstrap package from git (git clone https://github.com/twbs/bootstrap.git), the package.json of the project will already contain these dependencies under the peerDependencies key.
However, when you install it directly with npm, you have to have these dependencies at hand too. You can use the following command to overcome this:
npm install jquery#1.9.1 popper.js#^1.12.9 bootstrap

install latest jquery and popper.js via npm and then try the same code

Related

Error while moving bower to npm in ember project

I was trying to move all the bower packages as npm packages as part of our ember upgrade process.
Updated cli from 3.0.0 to 3.22 successfully.
While trying to move sweetalert2 from bower to npm using the below steps.
bower uninstall sweetalert2 --save //remove the package and remove from bower.json also
npm install sweetalert2 --save-dev //add as npm package and add in package.json also
ember s
While building project it throws the following error.
Build Error (SourceMapConcat)
ENOENT: no such file or directory, open '/var/folders/wm/w121z2bs7yngf13gc_qbsn_w0000gn/T/broccoli-5259Sy2X7u6LvqKk/out-854-broccoli_debug_debug_5_vendor_js/bower_components/sweetalert2/dist/sweetalert2.js'
Can anyone help me with this?

What is difference between npm install bootstrap and npm install bootstrap --save

Q.1 if we use below command how many places will be affected in angular project
npm install bootstrap
Q.2 what is difference if we use above command with --save
npm install bootstrap --save
Q1. Running 'npm install bootstrap' command will download the latest version of bootstrap and install in subfolder './node_module' folder.
Q2. Running install --save bootstrap will do same as above but will update package.json by adding entry under dependencies.
Before npm 5.0.0 they were different but now there is no difference.
Before version 5.0.0
npm install bootstrap --save would download the latest version of bootstrap and add it to your dependencies in package.json file.
npm install bootstrap would download the latest version of bootstrap but it would not add it in dependencies in package.json file.
After version 5.0.0
there is no difference between both commands. As it was --save was made default so with or without --save it would add it in dependencies in package.json
In addition, there are the complementary options --save-dev and --save-optional which save the package under devDependencies and optionalDependencies, respectively. This is useful when installing development-only packages, like grunt or your testing library.

Where and How should I add AsyncStorage with React Native 0.59?

I just upgraded to react-native 0.59.0-rc.3 and I'm getting a warning about AsyncStorage that will be removed from react-native and added to #react-native-community/async-storage.
But in the #react-native-community/async-storage it only says how to link it, but not how to install it
e.g npm install some_package
Where Should I install it from?
npm install react-native-community and just import it from that?
npm install #react-native-community/async-storage?
As it states on the repo
# Install
$ yarn add #react-native-community/async-storage
Usually if a dependency is available with yarn it is available with npm
However, if you are using npm instead of yarn you can install it with
npm i #react-native-community/async-storage
yarn and npm are both package managers. Choose one and stick with it.
To see if a package is available for npm you can search on https://www.npmjs.com
As you can see from the below link that it is on npm and can be installed using npm i.
https://www.npmjs.com/package/#react-native-community/async-storage
The NPM package is #react-native-community/async-storage.
Have a look at the NPM page for it

npm does not install new package after modifying package.json

I have a web application with some packages defined in package.json after I run npm install all dependencies are resolved. However when I add some packages after that to package.json and run npm install again nothing happens. I did the work around by typing npm install --save lodash and it downloaded the dependency and updated packages.json. It works, but let's imagine the scenario when I want to add 10 or more packages. Then it would be easier for me to just add them to package.json and run npm install but this does not work :/. So what would be the solution for the problem off adding more packages after initial npm install?
Node version: v8.1.3
npm version: 5.03
Operating System: Windows 10 Pro

npm packages installed from command line not appearing in packages.json dependencies for React-Native project

I have a React-Native project and I'm trying to install certain npm modules in my project.
However, when I try to do so from the command line, the packages says it is installed correctly, but it is not appearing in the packages.json dependency.
For instance, I installed react-relay using npm install react-relay.
The package looks to have installed correctly. But I check my packages.json and react-relay is not in there.
I have tried react-native link, and the packages are not coming up.
What is going on?
you would need to use the "save" option: npm install react-relay --save
You need to add save option
npm install react-relay --save
or
npm i react-relay --s
To remove node module from package.json file
npm uninstall react-relay --save
Here is documentation for npm install