npm install: Unsupported platform warning issue - npm-install

When I run npm install command, it shows following warning
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":"win32","arch":"x64"})
audited 18093 packages in 9.83s
36 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities

Based on my understanding and searching.
If you work on Windows OS, don't need to pay attention.
Because that is only for Mac OS. also NPM will not help install it into windows OS.
NPM fsevent
This module for MAC OS.
The FSEvents API in MacOS allows applications to register for notifications of changes to a given directory tree

Run This Command npm install --legacy-peer-deps

Related

Uninstalling quasar-cli via npm not working?

I was working on a Quasar project on my windows machine and out of blue it is saying quasar is not recognized as an internal or external command.
I tried to uninstall quasar-cli with the command npm uninstall -g quasar-cli but it seems it is not working. npm list -g --depth=0 command tells me that I still have the quasar-cli.
C:\Users\nitin>npm uninstall -g quasar-cli
up to date in 0.028s
C:\Users\nitin>npm list -g --depth=0
C:\Users\nitin\AppData\Roaming\npm
+-- #quasar/cli#1.1.0
+-- cordova#9.0.0
+-- nodemon#2.0.4
`-- vue-cli#2.9.6
I am also not able to install it again as it gives the following errors
C:\Users\nitin>npm install -g quasar-cli
npm WARN deprecated #babel/preset-stage-2#7.0.0-beta.54: � We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
npm WARN deprecated chokidar#2.0.4: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated #babel/preset-stage-3#7.0.0-beta.54: � We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
npm WARN deprecated core-js#2.6.11: 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 resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
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 joi#11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo#2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek#4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN rollback Rolling back is-descriptor#1.0.2 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\node_modules\define-property\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.2 (node_modules\quasar-cli\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.17.0","npm":"6.14.4"})
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\quasar-cli\node_modules\watchpack\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 ajv-keywords#3.5.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm ERR! code EEXIST
npm ERR! path C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\bin\quasar
npm ERR! dest C:\Users\nitin\AppData\Roaming\npm\quasar
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\bin\quasar' -> 'C:\Users\nitin\AppData\Roaming\npm\quasar'
npm ERR! File exists: C:\Users\nitin\AppData\Roaming\npm\quasar
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\nitin\AppData\Roaming\npm-cache\_logs\2020-07-19T04_24_31_029Z-debug.log
Can you please suggest where am I going wrong. I am new with npm and JS in general so please correct if I am missing something.
I've recently performed a manual delete for a similar issue I was facing, opting instead to use the rimraf package to delete a module from the npm root directory where global packages are installed.
Install rimraf using:
npm install rimraf -g
Navigate to the root folder of where the global packages are installed. Path to this can be found using:
npm root -g
Once you've cd' into the root folder perform the delete on the quasar-cli module using:
rimraf <name of folder>
Note:
<name of folder> is the name of the folder quasar-cli is contained within. Perform a dir/w to list the folder in the directory to check the exact name of the folder to insert in the command above.
The rimraf package is a cross-platform equivalent of what I use in the bash terminal rm -rf to recursively delete files and folders. You can see this in action on windows via: https://www.youtube.com/watch?v=qPCK6mWeqsk
Check that the removal of the package as per your previous command:
npm list -g --depth=0
Hope that helps
I ultimately had to delete the node-modules folder from
C:\Users\{user}\AppData\Roaming\npm\node_modules
as I was having issue not only with quasar but also with vue and everything else.
vue --version also wasn't working.
I deleted the node-modules folder from the above path and also from my project folder and then re-installed them using npm install -g command. This command needs to be run in your project folder where you have your package.json file.
Else you can individually install(globally using the -g appended to the command) each component of your need.
Restart the command prompt after installing the packages.
Don't forget to keep a list of all the packages you have using
npm list -g --depth=0`
Try this
npm uninstall -g #quasar/cli

Cannot find module 'webpack-cli/bin/config-yargs', cannot find module 'webpack-cli'

I have tried nearly all solutions however nothing has worked for me. i cloned a repo from a friend and tried to run the client directory. When i try run client, i get the error:
Cannot find module 'webpack-cli/bin/config-yargs'
Cannot find module 'webpack-cli'
Once i cloned the project i did npm install (as it said in the readME) but when i tried to run the client i would run into this problem:
solutions i tried:
npm install -g vue-cli
npm install --save-dev webpack
npm install --save-dev webpack-cli
i tried 'webpack --version' it will tell me i am missing something and if i want to install it. i click yes and i get the following error:
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN ajv-keywords#3.4.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.4.0 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#3.1.11 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli#3.3.11 requires a peer of webpack#4.x.x but none is installed. You must install peer dependencies yourself.
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"})
webpack-cli#3.3.11
updated 1 package and audited 12959 packages in 13.437s
24 packages are looking for funding
run npm fund for details
found 33 vulnerabilities (22 low, 7 moderate, 4 high)
run npm audit fix to fix them, or npm audit for details
Error: Cannot find module 'webpack-cli'
UPDATE:
My colleague updated some of the dependencies by GitHub bot and i pulled the repo. That seemed to do the trick

npm packages added after uninstall dependencies

Why after calling npm uninstall I see message added packages?
For example:
$ npm uninstall -S redux-devtools-dock-monitor redux-devtools-log-monitor redux-devtools
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 115 packages and removed 22 packages in 20.589s
For that specific example at least here is some removed packages. Sometimes it just shows only added <n> packages message.
Could someone clarify it?
UPD: I did a little test from scratch but everything works as I expected when uninstall something. But I see such messages like above in question really often.

Understanding on installing packages using npm

I just started to use npm command while learning angularJS2. I get errors while trying to install packages using npm command, for instance when i try to run this command
npm install json-typescript-mapper --save
to install json to typescript mapper package, i am not able to install it. am i missing something, should i change the registry? my current registry is http://registry.npmjs.org/ should i have to change the registry inorder to install the package
ERROR
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.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
and after that when i try to import the package, i get an error stating the package not found because the package was not added

warning when executing npm install

After installation of npm (version 4.1.2 on Windows 10) I executed "npm install". But I get the following warning:
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.0.17: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
Any ideas why?
The problem that the fsevents is module for OS X environment only. Probably your package.json or npm-shrinkwrap.json was created/updated on OS X and you are running npm install on a different OS, where fsevents should be omitted.