Getting error while installing react-stripe-js in my react Project - node.js

Getting this error on trying to install npm install #stripe/react-stripe-js.
Can anyone help ?
C:\Users\Ayush\Desktop\ReactBootcamp\amazon-clone>npm install #stripe/react-stripe-js
npm ERR! Object for dependency "#babel/generator" is empty.
npm ERR! Something went wrong. Regenerate the package-lock.json with "npm install".
npm ERR! If using a shrinkwrap, regenerate with "npm shrinkwrap".
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ayush\AppData\Roaming\npm-cache\_logs\2020-09-11T07_04_49_530Z-debug.log
enter image description here

try below steps
Delete node_modules folder
Delete package-lock.json file
run npm cache clean --force
npm install

Related

Heroku failed to push

I want to deploy my project on Heroku but when I do it, I have this error :
npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR!
npm ERR! Invalid: lock file's fs#0.0.1-security does not satisfy fs#*
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.3oo5n/_logs/2021-11-25T14_47_03_365Z-debug.log
-----> Build failed
Even when I delete "package-lock.json" and make "npm install", it still doesn't work.
This is the first time that I have this problem with Heroku deployment, I don't know what can I do about it.
Thank you for your help.
I was having the same issue and it was working at first then it stopped. Deleting the packages-lock.json file and then re-running npm install wasn't working. Strangely it did work if I just removed packages-lock.json but that wasn't the ideal solution.
Finally, I did get it to work by following:
delete my packages-lock.json file
delete node_modules
re-run npm install

npm ERR! Refusing to delete when Install react-native

I Have a Problem about NPM, I want to instal npm react-native with command npm install -g react-native-cli on cmd,
But, an error suddenly appeared like this :
npm ERR! path C:\Users\Xeon\AppData\Roaming\npm\react-native.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete C:\Users\Xeon\AppData\Roaming\npm\react-native.cmd: is outside C:\Users\Xeon\AppData\Roaming\npm\node_modules\react-native-cli and not a link
npm ERR! File exists: C:\Users\Xeon\AppData\Roaming\npm\react-native.cmd
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Xeon\AppData\Roaming\npm-cache\_logs\2020-02-12T03_00_40_156Z-debug.log
I don't know why this error appears, hopefully I can find a solution here.
thank you
Check your npm/node version, make sure they install correctly
currently there's no need to install react-native-cli for RN 0.61
you should try
npx react-native init ProjectName
or just using expo instead
npm install -g expo-cli
expo init AwesomeProject
Lastly, you should read the Official Doc for more details.

Angular8 node js and npm installation problems

I'm learning angular js. For this I've install nodejs and git. And I've run following command on CMD:
npm install -g #angular/cli#latest
After some time following error occurred
npm WARN rollback Rolling back #schematics/angular#8.3.21 failed (this is
probably harmless): EPERM: operation not permitted, lstat 'C:\Users\User
Name\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\#schematics'
npm ERR! code EEXIST
npm ERR! path C:\Users\User
Name\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
npm ERR! dest C:\Users\User Name\AppData\Roaming\npm\ng.ps1
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Chaitanya
Kulkarni\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng' ->
'C:\Users\Chaitanya Kulkarni\AppData\Roaming\npm\ng.ps1'
npm ERR! File exists: C:\Users\User Name\AppData\Roaming\npm\ng.ps1
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User Name\AppData\Roaming\npm-cache\_logs\2020-01-
04T12_12_30_922Z-debug.log
Can you please explain what is that error and how I could solve this. I am using Window 10.
Perform following steps:
Completely uninstall angular-cli from your machine
npm uninstall -g angular-cli
Clean npm cache
npm cache clean --force
Reinstall angular cli,
npm i #angular/cli#latest -g
Run this commands and manually delete the exist files if does not work.
Completely uninstall angular-cli from your machine
npm uninstall -g angular-cli
Clean npm cache
npm cache clean --force
Reinstall angular cli,
npm i #angular/cli#latest -g
Delete this file going to the location.
C:\Users\Chaitanya Kulkarni\AppData\Roaming\npm\ng.ps1
You can try opening the Command Prompt with Administrator privileges and then run the command.
Try to run following command in terminal
npm install -g #angular/cli#latest --force
In the terminal navigate to the following path:
C:\Users\UserName\AppData\Roaming\npm\node_modules
and delete angular file and reinstall cli.
That worked for me.
Also do check if you've set your path variables correctly.

npm ERR! Cache dir is required

When running npm install command, I kept getting "npm ERR! Cache dir is required" error.
npm install -g create-react-app
npm ERR! Cache dir is required
Does anyone know how to resolve this issue?
Update: The error disappeared without doing anything

Why my "node-package" doesn't appear in my node_modules folder?

I added this in my package.json file:
"models-package": "git+https://<token_key>:x-oauth-basic#github.com/<username>/models-package.git"
When I run npm install, it says:
npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run npm install to fix them.
npm ERR! Missing: models-package#git+https://<token_key>:x-oauth-basic#github.com/<username>/models-package.git
npm ERR! A complete log of this run can be found in:
npm ERR! <path>
I don't know why my custom models-package is not set in my node_modules folder. What's wrong here?
Probably because you didn't add this package through command line.
Try:
npm install --save git+https://<token_key>:x-oauth-basic#github.com/<username>/models-package.git

Resources