Version incompatibility node and npm? - node.js

I using from this command "nvm install node" and then nvm use 11, but get me bellow error:
npm ERR! notsup Required: {"node":">=14.15.0 <15"}
npm ERR! notsup Actual: {"npm":"6.7.0","node":"11.15.0"}
But I need just to use nvm use 11, what can I do? (witch version of npm?)
My system is Mac.
My error is:
> npm install && npx cordova prepare && npx gulp
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for moodlemobile#3.9.6-dev: wanted: {"node":">=14.15.0 <15"} (current: {"node":"11.15.0","npm":"6.7.0"})
npm ERR! notsup Not compatible with your version of node/npm: moodlemobile#3.9.6-dev
npm ERR! notsup Not compatible with your version of node/npm: moodlemobile#3.9.6-dev
npm ERR! notsup Required: {"node":">=14.15.0 <15"}
npm ERR! notsup Actual: {"npm":"6.7.0","node":"11.15.0"}
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/asheq/.npm/_logs/2021-09-02T04_50_08_043Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! moodlemobile#3.9.6-dev setup: `npm install && npx cordova prepare && npx gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the moodlemobile#3.9.6-dev setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/asheq/.npm/_logs/2021-09-02T04_50_08_060Z-debug.log

Related

Error while starting the backend in the node app.js in angular 6

When I am starting my backend in the angular using the node app.js command in the terminal it shows some error
I tried all the methods like npm-install or npm-install --save
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.7
npm WARN optional Skipping failed optional dependency /nodemon/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.7
npm WARN mongoose-type-url#1.0.5 requires a peer of mongoose# but none was installed.
npm ERR! Linux 4.15.0-44-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file /home/suraj/contactly/sales-tool/salesapp/node_modules/.staging/encrypt-36282e46/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token 'n' at 1:3
npm ERR! { name: 'encrypt',
npm ERR! ^
npm ERR! File: /home/suraj/contactly/sales-tool/salesapp/node_modules/.staging/encrypt-36282e46/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/suraj/contactly/sales-tool/salesapp/npm-debug.log
want to fix the bug

Erron on installing angular on mac

I try to install Angular CLI on mac with following command
sudo npm install -g #angular/cli
The error shown as follows
/usr/local/bin/ng -> /usr/local/lib/node_modules/#angular/cli/bin/ng
> fsevents#1.2.4 install /usr/local/lib/node_modules/#angular/cli/node_modules/fsevents
> node install
sh: node: command not found
> #angular/cli#6.0.8 postinstall /usr/local/lib/node_modules/#angular/cli
> node ./bin/ng-update-message.js
sh: node: command not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/#angular/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! #angular/cli#6.0.8 postinstall: `node ./bin/ng-update-message.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the #angular/cli#6.0.8 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! /Users/sugunan/.npm/_logs/2018-07-08T01_27_53_465Z-debug.log
How to fix the issue?
Following command worked
sudo npm install -g #angular/cli --unsafe-perm=true --allow-root

Cannot install cross-env on Laravel 5.5 fresh project

I'm trying to install corss-env on fresh Laravel 5.5 project.
I'm using
node v6.12.0
nmp 3.10.10
Vagrant 2.0.1
laravel/homestead (virtualbox, 4.0.0) on Windows 10
Ubuntu 16.04.3 LTS
I have been searching on the web, I'll try the following suggestions, but neither have solved the issue
https://github.com/JeffreyWay/laravel-mix/issues/478
https://github.com/react-boilerplate/react-boilerplate/issues/493
https://github.com/JeffreyWay/laravel-mix/issues/805
https://laracasts.com/discuss/channels/laravel/laravel-mix-windows-npm-error?page=1
This is the console output
$ npm install --save-dev cross-env
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.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-92-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "cross-env"
npm ERR! node v6.12.0
npm ERR! npm v3.10.10
npm ERR! path ../cross-env/dist/bin/cross-env.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../cross-env/dist/bin/cross-env.js' -> '/home/vagrant/code/laravel-5.5/node_modules/.bin/cross-env'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/code/laravel-5.5/npm-debug.log

Yeoman installation is showing errors

I am unable to install yo from npm I have found these errors while running installation of yo, I have made all the paths for environment variables, but still getting error, i have also cleared the cache and re-install the nodejs , reboot my pc but still getting this error
$ npm install --global yo
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
C:\Users\hp\AppData\Roaming\npm\yo -> C:\Users\hp\AppData\Roaming\npm\node_modules\yo\lib\cli.js
C:\Users\hp\AppData\Roaming\npm\yo-complete -> C:\Users\hp\AppData\Roaming\npm\node_modules\yo\lib\completion\index.js
spawn-sync#1.0.15 postinstall C:\Users\hp\AppData\Roaming\npm\node_modules\yo\node_modules\spawn-sync
node postinstall
npm#1.0.0 C:\Users\hp\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 (node_modules\yo\node_modules\spawn-sync):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 postinstall: node postinstall
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status -4058
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "yo"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! file ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
npm ERR! path ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
npm ERR! spawn-sync#1.0.15 postinstall: node postinstall
npm ERR! spawn ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync#1.0.15 postinstall script 'node postinstall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs spawn-sync
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.
npm#1.0.0 C:\Users\hp\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 (node_modules\yo\node_modules\spawn-sync):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 postinstall: node postinstall
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status -4058
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "yo"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\hp\npm-debug.log
npm ERR! code 1
Please tell me what is the problem with it.
Just install the latest version of nodejs and the error will get resolved.
Type the instructions in the terminal and node js will get updated:
$ sudo apt purge nodejs (for removing previous files of node js)
$ wget -qO- https://deb.nodesource.com/setup_7.x | sudo bash -(it will download latest version of node)
$ sudo apt-get install nodejs
and it is done.
Happened to me too... in recent distributions many packages install nodejs as the node.js executable, while spawn-sync attempts to call node, that is why this fails.
As a workaround, you can create a softlink from node to nodejs. Something like:
sudo ln -s `which nodejs` /usr/bin/node

Failed at chromedriver installation

I'm going to install slamdata on debian Jessie, as described here, but I failed at npm install section and it wanted to install chromedriver. I even tried a mirror of chromedriver. Here is logs.
exec#mob-db1:/opt/slamdata$ npm install
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
chromedriver#2.23.1 install /opt/slamdata/node_modules/chromedriver
node install.js
Downloading http://chromedriver.storage.googleapis.com/2.23/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Receiving...
ChromeDriver installation failed undefined
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.2.8-1-pve
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.23.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.23.1 install script node install.js.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/slamdata/npm-debug.log
exec#mob-db1:/opt/slamdata$ npm install chromedriver --chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into
npm and is now out of date with respect to npm
chromedriver#2.23.1 install /opt/slamdata/node_modules/chromedriver
node install.js
Downloading http://npm.taobao.org/mirrors/chromedriver/2.23/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Receiving...
ChromeDriver installation failed undefined
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.2.8-1-pve
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "chromedriver" "--chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.23.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.23.1 install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/slamdata/npm-debug.log
I met it with 'yarn install' which info 'chromedriver: ChromeDriver installation failed Error with http'.So i try to install chromedriver before 'yarn install'.
And then solve it.
https://www.npmjs.com/package/chromedriver
If you are not able to install chrome driver through npm, use the binary files of chrome driver. Make sure you download the same version binary file as that of your chrome browser.
Go to: https://chromedriver.chromium.org/
This will give you an exe file.
Put this file in user/AppData/Roaming/npm directory.
set this to PATH environment variables.
Thats it! You are done :)

Resources