Many questions such as this one talk about this very annoying behavior on non-mac OS.
When I run npm install I want to remain aware of any warnings, but in Windows or Linux I would get this:
$ ./npm install
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 fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (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":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/watchpack-chokidar2/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#^1.2.7 (node_modules/webpack-dev-server/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#^1.2.7 (node_modules/laravel-mix/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 bootstrap#4.5.0 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
added 279 packages from 165 contributors, removed 4 packages, updated 2 packages and audited 1978 packages in 27.632s
Notice that most WARN are caused by fsevents which is not available outside of macOS.
Some suggest to hide every warnings with:
npm --logevel=error install
Others advise to use:
npm install --no-optional --no-shrinkwrap --no-package-lock
But all these methods does not seem right to me. I only want to execute npm install and have a configuration file that would hide all optional dependencies that are not available on my operating system.
How can I do that?
npm install --no-optional prevents this warning.
i use mac os calina ver 10.15.3
i run :
npm install -g expo-cli
i have error :
npm WARN deprecated request#2.88.2: request has been deprecated, see request/request#3142
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 deprecated joi#14.0.4: 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 request#2.88.0: request has been deprecated, see request/request#3142
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 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 deprecated hoek#6.1.3: This module has moved and is now available at #hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated topo#3.0.3: This module has moved and is now available at #hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
#expo/traveling-fastlane-darwin#1.13.1 preinstall /usr/local/lib/node_modules/expo-cli/node_modules/#expo/traveling-fastlane-darwin
node platform.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/traveling-fastlane-linux#1.13.1 (node_modules/expo-cli/node_modules/#expo/traveling-fastlane-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/traveling-fastlane-linux#1.13.1: wanted {"os":"win32,linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-freebsd-x64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-freebsd-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-freebsd-x64#2.2.8: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-x64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-x64#2.2.8: wanted {"os":"linux","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-sunos-x64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-sunos-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-sunos-x64#2.2.8: wanted {"os":"sunos","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-arm64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-arm64#2.2.8: wanted {"os":"linux","arch":"arm64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-ia32#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-ia32#2.2.8: wanted {"os":"linux","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-arm#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-arm#2.2.8: wanted {"os":"linux","arch":"arm"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-freebsd-ia32#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-freebsd-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-freebsd-ia32#2.2.8: wanted {"os":"freebsd","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-win32-ia32#2.2.8-beta.1 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-win32-ia32#2.2.8-beta.1: wanted {"os":"win32","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-darwin-ia32#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-darwin-ia32#2.2.8: wanted {"os":"darwin","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-win32-x64#2.2.8-beta.1 (node_modules/expo-cli/node_modules/#expo/ngrok-bin/node_modules/#expo/ngrok-bin-win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-win32-x64#2.2.8-beta.1: wanted {"os":"win32","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN #expo/image-utils#0.2.18 requires a peer of sharp-cli#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /usr/local/bin/expo
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/expo-cli/bin/expo.js',
npm ERR! dest: '/usr/local/bin/expo'
npm ERR! },
npm ERR! stack: "Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/expo-cli/bin/expo.js',
npm ERR! dest: '/usr/local/bin/expo'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/duclong/.npm/_logs/2020-04-09T19_09_53_271Z-debug.log
Looks like an issue with the node package. Upgrade node version.
The error message itself is telling you what to do. It is a permission error. EACCES is always a permission error. It tries to setup symlinks for /usr/local/bin/expo but it can’t. Try running the command with sudo, like sudo npm i -g expo-cli. If it does not help, try to reinstall node completely. I recommend nvm for installing and managing node versions.
chamika#chamika-MS-7817:~/Documents/React Native Projects/navi$ npm install react-navigation
npm WARN #react-native-community/masked-view#0.1.5 requires a peer of react-native#^0.57 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#2.15.0 requires a peer of #typescript-eslint/parser#^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#5.1.0 requires a peer of #typescript-eslint/parser#2.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#5.1.0 requires a peer of eslint#6.x but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-stack#2.0.10 requires a peer of react-native-safe-area-context#^0.6.0 but none is installed. You must install peer dependencies yourself.
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":"linux","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":"linux","arch":"x64"})
react-navigation#4.0.10
updated 1 package and audited 1858915 packages in 11.492s
35 packages are looking for funding
run npm fund for details
found 4 low severity vulnerabilities
run npm audit fix to fix them, or npm audit for details
These are not errors, they are just warnings that you need to install the sub-dependencies of the given package yourself. React Navigation is installed successfully in this case and you can use it fine. You can try doing npm audit fix which will try to fix these warnings by installing the dependencies.
I have created a vue-cli project.
And I tried to add vuetify but I couldn't do it
I've run: npm install vuetify --save
A error came out on terminal:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.3 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
When I try to import vuetify on main.js it says that can't find the module.
Does anyone know how to fix/install it?
You could try using yarn, I find it sometimes performs better
install yarn
npm i -g yarn
Then install dependencies (run in your package.json file folder)
yarn
You can also do a clean install by first removing the nodes_modules folder, and then install without optional dependencies npm install --no-optional
I'm trying to install react-native-cli by using the following command:
C:\WINDOWS\System32>npm install -g react-native -cli
and I'm getting the following errors, can someone help on this matter?
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
D:\Programming\React.js\ProgrammingReact.jsnode_modules\node_modules\react-native -> D:\Programming\React.js\ProgrammingReact.jsnode_modules\node_modules\node_modules\react-native\local-cli\wrong-react-native.js
npm WARN react-native#0.54.0 requires a peer of react#^16.3.0-alpha.1 but none is installed. You must install peer dependencies yourself.
npm WARN #babel/plugin-check-constants#7.0.0-beta.38 requires a peer of #babel/core#7.0.0-beta.38 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\react-native\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"})