Problems with jspdf installtion - npm

I was trying to install JSPDF using "npm install jspdf --save" command, but it is not getting installed.
It stops in the below line,
newProject: npm install jspdf --save
⸨░░░░░░░░░░░░░░░░░░⸩ ⠹ fetchMetadata: sill resolveWithNewModule jspdf#1.5.3 checking installable status
Please help me to solve this.

I'm also using jspdf version 1.5.3, and there's no problem
you can use
npm install jspdf
you don't need to add --save
or with version
npm install jspdf#1.5.3

Related

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

Incorporating jsPDF to your already existing Vuetify project

I am trying to incorporate jsPDF to my already existing Vuejs project to generate PDF outputs. However when I run npm i jsPDF --save in the terminal it gives me an error saying:
npm ERR! code E404
npm ERR! 404 Not Found: jsPDF#latest
How do I fix this problem?
Try with npm install jspdf --save instead of jsPDF since the name of a package is case sensitive.
The package on npm is under "jspdf" not "jsPDF" so:
npm install jspdf --save

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

IntelliJ cant see npm plugins

My IntelliJ is not seeing my karma plugins:
WARN [plugin]: Cannot find plugin "karma-ng-extjs-scenario".
Did you forget to install it ?
npm install karma-ng-extjs-scenario --save-dev
WARN [plugin]: Cannot find plugin "karma-jasmine".
Did you forget to install it ?
npm install karma-jasmine --save-dev
WARN [plugin]: Cannot find plugin "karma-chrome-launcher".
Did you forget to install it ?
npm install karma-chrome-launcher --save-dev
WARN [plugin]: Cannot find plugin "karma-firefox-launcher".
Did you forget to install it ?
npm install karma-firefox-launcher --save-dev
I believe it is because i was following a tutorial that told me to install them globally.
But then i realised that i wanted to install them locally and save to the package.json.
I try again to install locally and it doesnt fix it:
$ npm install karma-jasmine --save-dev
npm WARN package.json karma-ie-launcher#0.1.5 No README data
info trying registry request attempt 1 at 21:06:11
http GET https://registry.npmjs.org/karma-jasmine
http 304 https://registry.npmjs.org/karma-jasmine
karma-jasmine#0.1.5 ../../../node_modules/karma-jasmine
I can however run karma from within my project from the command line and the plugins exist in the npm modules directory.
Is there a way to fix this or do i need to reinstall the packages from scratch? If so, what is the easiest way of doing that?
the --link flag linked the global install into the local directory.
npm install karma-jasmine --save-dev --link