I'm trying to install react-paypal-button for a project that I'm working on
but when I do npm install react-paypal-button#2.0.3 I end up getting this error
C:\Users\ryan1\Downloads\Capstone\Ovals>npm install react-paypal-button#2.0.3
> react-paypal-button#2.0.3 preinstall
C:\Users\ryan1\Downloads\Capstone\Ovals\node_modules\react-paypal-button
> rm -rf dist
'rm' is not recognized as an internal or external command,
operable program or batch file.
npm WARN rollback Rolling back readable-stream#2.3.6 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\ryan1\Downloads\Capstone\Ovals\node_modules\chokidar\node_modules\fsevents\node_modules'
npm WARN ajv-keywords#3.4.0 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-async-script-loader#0.3.0 requires a peer of react#^15.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.0.1 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-paypal-button#2.0.3 preinstall: `rm -rf dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-paypal-button#2.0.3 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
If anyone know how to fix it it would be a great helpenter code here
The issue is with this command: rm -rf dist.
'rm' is not recognized as an internal or external command
Follow this link to install react-paypal-button.
Also have a look on this as well dist-tag rm
Related
I am facing the following errors when I try to install node modules in an existing Angular project. I am trying to install the node modules in windows machine(Win32 X64).
> core-js#2.6.12 postinstall node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('-/postinstall')}catch(e){}"
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\ng-cli-pug-loader\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted ("os":"darwin","arch":"any") (current: {"as":"vin3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\#angular\compiler-cli\node_modules\fsevents): arch":"x64"})
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted ("os": "darwin","arch":"any") (current: {"as":"u ","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted ("os": "darwin","arch":"any") (current: {"as":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn bash
npm ERR! file bash
npm ERR! path bash
npm ERR! errno -4058
npm ERR! core-js#3.6.4 postinstall: "node -e "try(require('./postinstall')}catch(e){}"
npm ERR! spawn bash ENOENT
npm ERR!
npm ERR! Failed at the core-js#3.6.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\test\AppData\Roaming\npm-cache\_logs\2021-06-23T16_43_06_961Z-debug.log
The following are the versions installed in my system
AngularCli : 8.3.29
Node : 14.17.1
NPM: 8.2.12
I have tried deleting node modules folder and running npm cache clean --force and reinstalling node modules , also tried uninstalling nodejs and deleting the npm-cache folder and reinstalling again.
Still I am facing the same issue. Any help would be appreciated.
This error means that the postinstall script is fork-and-exec'ing bash, which is not present on Windows. You need to run this from a Bash emulator like MINGW64 (Git Bash).
Trying to run a React project. I have installed the most recent node as well as tried older versions based on the readme. I've uninstalled Node, cleared all traces of it from APPDATA/ROAMING and ProgramFiles then reinstalled. Colleagues have various versions of Node and npm on their machines and are able to run the project locally. I have checked my environment variables and made sure the PATH properties are set correctly. I have removed this particular package from the JSON file and retried and see similar issues. Node and npm are clearly installed. Anyone ever faced this situation or have suggestions to try? I've been working at this for days! Thanks.
PS C:\dev\NAE\become-react-app> node --version
v14.16.0
PS C:\dev\NAE\become-react-app> npm -v
6.14.11
PS C:\dev\NAE\become-react-app> npm i
> #newrelic/native-metrics#5.0.0 install C:\dev\NAE\become-react-app\node_modules\#newrelic\native-metrics
> node ./lib/pre-build.js install native_metrics
'node' is not recognized as an internal or external command,
operable program or batch file.
> husky#4.2.3 install C:\dev\NAE\become-react-app\node_modules\husky
> node husky install
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.2 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.2 (node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #newrelic/native-metrics#5.0.0 (node_modules\#newrelic\native-metrics):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #newrelic/native-metrics#5.0.0 install: `node ./lib/pre-build.js install native_metrics`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! husky#4.2.3 install: `node husky install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the husky#4.2.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ngmoscho\AppData\Roaming\npm-cache\_logs\2021-03-18T21_32_55_714Z-debug.log
PS C:\dev\NAE\become-react-app> npm run start:local
> become-react-app#1.1.0 prestart:local C:\dev\NAE\become-react-app
> npm run makeLocalEnv
'npm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! become-react-app#1.1.0 prestart:local: `npm run makeLocalEnv`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the become-react-app#1.1.0 prestart:local script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ngmoscho\AppData\Roaming\npm-cache\_logs\2021-03-18T22_08_46_897Z-debug.log
I would try to reinstall Node again!
I had it once where it seemed to be installed, but wasn't when executing a command. Just like you. Even after reinstalling npm and node, the result was the same.
I rebooted my computer and that fixed the problem for me.
Pretty lame solution, took me a while to find out.
Hope this helps for you too.
I try npm install on vagrant. I get always this error:
vagrant#homestead:~/code/7app$ npm i
npm WARN deprecated axios#0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.1 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN vuetifyjs-mix-extension#0.0.14 requires a peer of sass-loader#^9.0.2 but none is installed. You must install peer dependencies yourself.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/vagrant/code/7app/node_modules/yargs/node_modules/yargs-parser/package.json.321473922
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/app/node_modules/yargs/node_modules/yargs-parser/package.json.321473922'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2021-02-20T09_40_09_286Z-debug.log
I tried to reinstall npm and node.
If i deploy it to the test server, it works well.
Some idea what i have to do?
From npm docs :
The error Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 is a consequence of joyent/node#8141, and is an issue with the Node installer for Windows. The workaround is to ensure that C:\Users\<user>\AppData\Roaming\npm exists and is writable with your normal user account.
Link: https://docs.npmjs.com/common-errors
I have upgraded node version 8 to 12 and then deleted node_modules and package-lock.json then i have run the below cmd to upgrade all the compatible modules.
npm update
then, while doing "npm install", getting this error
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Ramya\AppData\Roaming\nvm\v12.18.4\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ramya\\AppData\\Roaming\\nvm\\v12.18.4\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd D:\TT-workspace\selfcarewebui\node_modules\fibers
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
Alpine users please run: `sudo apk add python make g++`
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN notsup Unsupported engine for watchpack-chokidar2#2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.18.4","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2#2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\webpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\karma\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN angular-material#1.0.8 requires a peer of angular-mocks#>=1.3 <1.6 but none is installed. You must install peer dependencies yourself.
npm WARN angular-material#1.0.8 requires a peer of angular-route#>=1.3 <1.6 but none is installed. You must install peer dependencies yourself.
npm WARN autoprefixer#10.0.0 requires a peer of postcss#^8.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin#1.0.1 requires a peer of webpack#^1.9.11 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx#5.3.1 requires a peer of acorn#^6.0.0 || ^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN selfcarewebui#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers#3.1.1 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#3.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Old version details
Node.js: v8.10.0
npm: v5.7.1
Tried to run this on Ubuntu 18.04 x64. It used to work properly a day ago but it stopped out of nowhere.
npm i simple-youtube-api
I used to be able to install them but not anyone, im getting this:
> bufferutil#4.0.1 install /root/NezukoBot/node_modules/bufferutil
> node-gyp-build
sh: 1: node-gyp-build: Permission denied
npm WARN discord.js#11.5.1 requires a peer of #discordjs/uws#^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando#0.10.0 requires a peer of sqlite#^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules/pm2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules/mocha/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.12 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! bufferutil#4.0.1 install: `node-gyp-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the bufferutil#4.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-07-02T12_58_27_816Z-debug.log
I have tried this but i still get the error:
npm config set user 0
npm config set unsafe-perm true
NPM is careful when installing packages as root.
Installing global packages as root or sudo can potentially damage your operating system, as it may accidentally replace files critical to the operating system itself.
However if you still want to proceed, you know what you are doing and you are e.g. using a virtual machine, you can do.
npm install --unsafe-perm -g simple-youtube-api
See unsafe-perm documentation.
Just try to run the command under a user other than root.
https://timjrobinson.com/fixing-node-gyp-permission-denied-when-running-as-root/