Am trying to install Angular CLI 7.1.4 in windows 10.
npm install -g #angular/cli#7.1.4
But am getting below error
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.2 (node_modules#angular\cli\node_modules\chokidar\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 ERR! code ERR_INVALID_OPT_VALUE
npm ERR! The value "false" is invalid for option "readableHighWaterMark"
npm ERR! A complete log of this run can be found in:
Please help me to fix this issue.
Node Version:
v10.16.3
NPM Version:
6.9.0
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 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
My aim is to update Node.js to the latest.
I followed the instructions on this page.
I got the error when executing npm install -g n:
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n#6.7.0: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
I don't know what that means.
You can still install newest/needed version of Node.js on Windows by downloading it from: https://nodejs.org/en/download/
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/