Can some one help me solving this problem to install nodemon - node.js

loadDep:fsevents -> reque - |##########---------------------------------------|
WARN engine fsevents#2.3.2: wanted: {"node":"^8.16.0 || ^10.6.0 || >=11.0.0"} (c/home/gapvak-cs3/.npm-global/bin/nodemon -> /home/gapvak-cs3/.npm-global/lib/node_modules/nodemon/bin/nodemon.js
> nodemon#2.0.12 postinstall /home/gapvak-cs3/.npm-global/lib/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
/home/gapvak-cs3/.npm-global/lib
`-- nodemon#2.0.12
npm WARN optional Skipping failed optional dependency /nodemon/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#2.3.2

it is just a warning on OSx, you can force installation with
npm install -f

Related

Can't run npm install on Ubuntu 20.4 server

I have a node.js application that I want to run on an Ubuntu 20.4 server, when I try to run the command npm install, I see the following error, I do not have root access on the server, where can this problem be? I have version 6.14.3 of npm and version 14.15.3, how can i deal with this problem?
```
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but package-lock.json was generated for lockfileVersion#2. I'll try to do my best with it!
> core-js#2.6.12 postinstall /var/www/site/public_html/node_modules/#nuxt/babel-preset-app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> core-js#3.10.2 postinstall /var/www/site/public_html/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> bootstrap-vue#2.21.2 postinstall /var/www/site/public_html/node_modules/bootstrap-vue
> opencollective || exit 0
sh: 1: opencollective: Permission denied
> nuxt#2.15.4 postinstall /var/www/site/public_html/node_modules/nuxt
> opencollective || exit 0
sh: 1: opencollective: Permission denied
> swiper#5.4.5 postinstall /var/www/site/public_html/node_modules/swiper
> echo "Love Swiper? Support Vladimir's work by donating or pledging on patreon:
> https://patreon.com/vladimirkharlampidi
"
Love Swiper? Support Vladimir's work by donating or pledging on patreon:
> https://patreon.com/vladimirkharlampidi
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/watchpack-chokidar2/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.2 (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"})
added 1334 packages from 697 contributors and audited 1338 packages in 17.59s
102 packages are looking for funding
run `npm fund` for details
found 58 vulnerabilities (39 moderate, 18 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
```
This might have the issue with permission
Try this
sudo npm cache clean
sudo npm install

Can anyone help me with React Installation? I am getting this weird error

After struggling for days, searching StackOverflow, and reading tutorials, I am stuck with react installation. I am sharing step by step of what I did.
Node version is 14.15.3.
Run npx create-react-app blog and this is the result:
`Creating a new React app in C:\My Garbage\Html & CSS\React.js\blog.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
> core-js#2.6.12 postinstall C:\My Garbage\Html & CSS\React.js\blog\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js#3.8.1 postinstall C:\My Garbage\Html & CSS\React.js\blog\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure#3.8.1 postinstall C:\My Garbage\Html & CSS\React.js\blog\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
> ejs#2.7.4 postinstall C:\My Garbage\Html & CSS\React.js\blog\node_modules\ejs
> node ./postinstall.js
+ react#17.0.1
+ react-scripts#4.0.1
+ cra-template#1.1.1
+ react-dom#17.0.1
added 1903 packages from 721 contributors and audited 1907 packages in 116.704s
124 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Initialized a git repository.
Installing template dependencies using npm...
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (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.2.1 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.2.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\watchpack-chokidar2\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\webpack-dev-server\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"})
+ #testing-library/jest-dom#5.11.6
+ web-vitals#0.2.4
+ #testing-library/user-event#12.6.0
+ #testing-library/react#11.2.2
added 29 packages from 77 contributors and audited 1936 packages in 10.711s
124 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Removing template package using npm...
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.2.1 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.2.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\watchpack-chokidar2\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (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#1.2.13 (node_modules\webpack-dev-server\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"})
removed 1 package and audited 1935 packages in 6.56s
124 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Created git commit.
Success! Created blog at C:\My Garbage\Html & CSS\React.js\blog
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd blog
npm start
Happy hacking!`
cd blog
Now while running npm start i am getting this error:
$ npm start
> blog#0.1.0 start C:\My Garbage\Html & CSS\React.js\blog
> react-scripts start
'CSS\React.js\blog\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\My Garbage\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! blog#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the blog#0.1.0 start 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\JYOTIRMOY\AppData\Roaming\npm-cache\_logs\2020-12-29T10_59_15_177Z-debug.log```
Hoping for your valuable help :)
I'd advise you to use more 'normal' paths for your projects.
Computers dislike spaces, but have learned to deal with them.
But the & sign in your path breaks the command. Bash interprets it as
blog#0.1.0 start C:\My Garbage\Html & CSS\React.js\blog, which is why it tells you that it couldn't find 'CSS\React.js\blog\node_modules...'
The easiest way to fix it is renaming your folder to something without &

Installing React project as symlink shows vulnerability warnings

I'm trying to share React components between a web project and desktop project. I found this article that details how to do so while not ejecting from create-react-app.
https://medium.com/capriza-engineering/sharing-source-code-and-libraries-in-react-bd30926df312
In short, it says:
- Create two React projects with CRA, one with the shared components and another that will be consuming them.
- Install the shared project in the consumer project as a symlink with npm install "../shared-project".
- Use react-app-rewired and customize-cra to make Babel compile everything in the common folder.
Although, after using npm install "../shared-project" I get the following:
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated flatten#1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\jest.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\jest
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\jest as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\jest
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\rimraf.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\rimraf
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\rimraf as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\rimraf
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\svgo.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\svgo
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\svgo as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\svgo
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\js-yaml.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\js-yaml
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\js-yaml as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\js-yaml
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\browserslist.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\browserslist
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\browserslist as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\browserslist
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\semver.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\semver
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\semver as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\semver
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esparse.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esvalidate.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esvalidate as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esparse as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
> core-js#2.6.9 postinstall D:\Projects--Tests\Project\web\node_modules\babel-runtime\node_modules\core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> core-js#3.1.4 postinstall D:\Projects--Tests\Project\web\node_modules\core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.4 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.7 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ shared#0.1.0
added 126 packages from 43 contributors, removed 190 packages, updated 1297 packages and audited 1794232 packages in 314.002s
found 14108 vulnerabilities (3 moderate, 14104 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
If I continue with the steps detailed above everything works but what worries me the most is the 3 moderate, 14104 high, 1 critical message. I don't what to look past it. Any idea how can I fix this?
Thanks in advance!

npm install -g #angular/cli command does not install angular cli

I am creating a sample angular2 web app. For that i have installed node.js (v 7.1.0)and NPM (v 3.10.9).
and now after opening system command prompt when I execute the command :
NPM install -g #angular/cli
to install angular cli I am getting the following shown results.
After doing ng -v to check the version of cli installed I am not getting the version number.
Is the cli not installed correctly?
or do I need to set any path variable in environment var?
What has to be done here? Please advise.
C:\Users\27727>d:
D:\>cd learn-angular
D:\learn-angular>npm i -g #angular/cli
npm WARN gentlyRm not removing C:\Users\27727\AppData\Roaming\npm\ng.cmd as it w
asn't installed by C:\Users\27727\AppData\Roaming\npm\node_modules\#angular\cli
npm WARN gentlyRm not removing C:\Users\27727\AppData\Roaming\npm\ng as it wasn'
t installed by C:\Users\27727\AppData\Roaming\npm\node_modules\#angular\cli
C:\Users\27727\AppData\Roaming\npm\ng -> C:\Users\27727\AppData\Roaming\npm\node
_modules\#angular\cli\bin\ng
C:\Users\27727\AppData\Roaming\npm
`-- #angular/cli#1.7.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\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":"win32","arch":"x64"}
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fs
events):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN ajv-keywords#3.1.0 requires a peer of ajv#^6.0.0 but none was installed
.
D:\learn-angular>ng -v
'ng' is not recognized as an internal or external command,
operable program or batch file.
D:\learn-angular>
In your system please check this path ( C:\Program Files\nodejs ) is there in environment variables.

UNMET PEER DEPENDENCY webpack#3.5.5 and babel-loader error

I'm having trouble installing webpack dev with the following command: npm i --save-dev webpack
Webpack is installed succesfully on my computer as npm i webpack -g #3.5.5 so no issues here.
When I run npm i --save-dev webpack I get a babel-core error reading the following; it will not let me proceed without usinf webpack 1, 2 pr 2.1.0-beta
I cannot get past this and have search stackoverflow and multiple sites.
In my situation, I'm using it with Redux on Windows.
This is my error.
`-- UNMET PEER DEPENDENCY webpack#3.5.5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN babel-loader#6.2.10 requires a peer of webpack#1 || 2 || ^2.1.0-beta ||
^2.2.0-rc but none was installed.
npm WARN prj400r#1.0.0 No description
npm WARN prj400r#1.0.0 No repository field.
Highlighting the babel-core error as being the most problematic. Any workaround?
Update babel-loader to version 7.x.x and it should solve your problem. The previous versions required webpack 1 and this support was dropped in version 7
Release v7.0.0

Resources