bootstrap#4.0.0-alpha.3 invalid - npm

Installing bootstrap 4 via npm I keep getting the same error:
Any ideas how to successfully install bootstrap 4 with npm? I have tried all options from this answer

May be you missed to add --save after the npm command
Use this:
npm install bootstrap#4.0.0-alpha.3 --save
For latest version :
npm install bootstrap#next --save

To install bootstrap 4.0.0-alpha.6 using your package.json file, you need to add this to the devDependencies:
"bootstrap": "4.0.0-alpha.6"
Hope that helps.

Workaround: Installed it with bower instead and it worked.
bower install bootstrap#v4.0.0-alpha.3

Related

What's the fix for Error: Node Sass version 8.0.0 is incompatible with ^4.0.0?

So, I had used sass before using npm install node-sass for my reactjs project. I'm now working on a new project and wanted to use sass again. With the same syntax npm install node-sass to get it installed, I continued to get
./src/components/Main.scss (./node_modules/css-loader??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/react-scripts/node_modules/sass-loader/lib/loader.js??ref--6-oneOf-5-3!./src/components/Main.scss)
Error: Node Sass version 8.0.0 is incompatible with ^4.0.0.
Or
to import sass files, you first need to install node-sass. run `npm install node-sass` or `yarn add node-sass` inside your workspace
...
...
I followed the instructions to have sass installed from the links npmjs
sass-lang
using these syntaxes
brew install sass/sass/sass
npm install -g sass
but I'm still encountering either errors I mentioned earlier.
I tried deleting the node-module folder, package-lock.json and reinstalled node-modules. That still did not fix the error. Also, I followed how others got around fixing Node Sass version 5.0.0||6.0.0|| 7.0.0 incompatibility issue but that did not fix mine.
I'm seeking help now.
Don't use node-sass anymore
You can easily fix it by the following.
npm uninstall node-sass
npm install sass
This is because node-sass is now deprecated. You will have to install its new version which is sass. Sinc it works all the same and better, this will easily fix the issue without making any additional changes.
And all Works well !
But if you still prefer to use node-sass
You can use the following table to install the appropriate version node-sass for your installed Node.js version which you can check by the command node --version.
npm install node-sass#(your version)
update sass-loader, or remove and install again.
Try this: In your packege.json file, delete "node-sass": "^4.12.0" and replace it with "sass": "". This did it for me.
You can follow these two steps:
Uninstall your node-sass:
npm uninstall node-sass
Install old version node-sass:
npm install --save-dev --unsafe-perm node-sass#4.14.1
It's okay now
The answer for me was to update react-scripts to 4.0.3. I couldn't do the latest version of react-scripts because it still requires a bunch of hacks to make packages work that had polyfilled modules automatically loaded before.

unable to install vue chart.js in vue

I'm trying to install vue-chart.js but unable to install. I tried by reinstalling npm and deleting package-lock.json file but doesnot work. I tried other methods as well but couldnot get succeed.
Please help me.
You must install the dependencies given in error. Listed below:
eslint#^5.0.0
For global install, use
npm install -g eslint
or For developement installation
npm install eslint --save-dev
Refer: https://www.npmjs.com/package/eslint
After deleting node modules and reinstalling npm solved my issue.

Unable to install a particular version of a npm package

I am trying to install rn-fetch-blob#0.10.15. but it's automatically installing the latest version i.e 0.10.16. I tried to install as follows,
npm install rn-fetch-blob#0.10.15
as per this solution, it should work as expected. But not working in my case.
Any help is appreciated.
Directly change your package.json file:
"dependencies": {
"rn-fetch-blob": "0.10.15",
...
}
And run: npm install --save
NOTE: With npm 5 and above you don't need the --save flag and package-lock.json file gets updated every time you do npm install

npm install -g not working while uninstalling react-native-cli?

I am trying to uninstall the "react-native-cli" which I use for react-native projects! but I am not able to do so!
My environment is mac.
Here is what i have done so far!
Whether I type npm uninstall -g react-native-cli or sudo npm uninstall -g react-native-cli.
The terminal shows: up to date in 0.041s
When I type react-native init projectName, it still creates the project.
I think the command react-native init should not to work.
Anyone knows how to uninstall react-native-cli ?
Thanks in advance.
SOLUTION ONE !
not fully sure this will work! but try updating your npm first by doing
npm install npm
and after that try uninstalling the cli if that does not work then
SOLUTION TWO !
Here is another go around to solve the issue its a bit manual way
1: First run this
npm list -g
this will show the list of installed packages in your user folder
then check . using command+f if there is react-native-cil there
then do this
open /usr/local/lib/node_modules
This will open the root installed packages and you can manually find and delete the react-native-cli like this
If you are using yarn. You can do yarn global list then check that if any package contains react-native. Then run yarn global remove <package> to remove that package.
ex:
yarn global remove #react-native-community/cli
You can uninstall react native CLI using:
npm uninstall -g react-native-cli

I already installed an npm library, how do I add it to my package.json dependencies??

I already installed an npm library. When installing I forgot to add the "-save" flag. How do I add the library to the package.json dependencies?
you can manually add the specific dependency as below:-
example(package.json):-
"react": "^15.6.1"
if you don't know the version of the library you're going to install, just do the install again on project path as below:
npm i react -S
This will add stable version automatically to package.json. Hope this helps.
You can run the command:
npm install react --save
or
npm install react --save-dev