error while installing firebase-tools - node.js

I am trying to install firebase-tools, but I am getting following error
root#dell-Inspiron-3542:/home/dell# npm install -g firebase-tools
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: async#1.0.0 (node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator /node_modules/async):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= integrity checksum failed when using sha1: wanted sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= but got sha1-MFWnerUOFFoQ4RGVO5qRs6aDFew=. (13270 bytes)
npm ERR! code EINTEGRITY
npm ERR! sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= integrity checksum failed when using sha1: wanted sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= but got sha1-C7um0vYsDjQcA9NpIGhvtn7+YU0=. (21377 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-09-06T03_26_15_726Z-debug.log
My node version is v8.4.0
npm version is
5.3.0.
note: I use nvm to manage different node versions.

Related

Gatsby default starter

This error came when I created gatsby-default-starter site. How to solve it. What is the problem with it?
Error message:
‼ pngquant pre-build test failed i compiling from source × Error: pngquant failed to build, make sure that libpng-dev is installed at D:\gatsby-project\my-gatsby-project\node_modules\bin-build\node_modules\execa\index.js:231:11 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Promise.all (index 0) 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"}) 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":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pngquant-bin#6.0.0 postinstall: node lib/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pngquant-bin#6.0.0 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:
ERROR
Command failed with exit code 1: npm install
Error: Command failed with exit code 1: npm install
error.js:56 makeError [npm]/[gatsby-cli]/[execa]/lib/error.js:56:11
index.js:114 handlePromise [npm]/[gatsby-cli]/[execa]/index.js:114:26
task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5
init-starter.js:135 install [npm]/[gatsby-cli]/lib/init-starter.js:135:7
init-starter.js:202 clone [npm]/[gatsby-cli]/lib/init-starter.js:202:3
init-starter.js:343 initStarter [npm]/[gatsby-cli]/lib/init-starter.js:343:5
create-cli.js:494 [npm]/[gatsby-cli]/lib/create-cli.js:494:9
It seems that you are using Windows as OS. This issue is usually related to some additional dependencies that you may need. Try the following:
Delete your project (to avoid potentially corrupted dependencies).
Install the windows-build-tools by:
npm install --global windows-build-tools --vs2015
Run your starter command and develop it. For example:
npm install -g gatsby-cli
gatsby new gatsby-site
cd gatsby-site
gatsby develop
If the issue persists try installing manually the missing dependencies by:
npm install imagemin-pngquant#5.0.1 --save
npm install pngquant-bin#3.1.1 --save
For further details check Gatsby on Windows docs.

Installing puppeteer results in "file already exists" error

When I first tried to install puppeteer through npm, I got errors saying permission is denied for the .local-chromium folder. So I followed this SO post and that error went away, but now there is another (base path is omitted):
$ sudo npm install puppeteer --unsafe-perm=true
> puppeteer#5.2.1 install ##########/node_modules/puppeteer
> node install.js
(node:25349) ExperimentalWarning: The fs.promises API is experimental
Downloading Chromium r782078 - 126.4 Mb [====================] 100% 0.0s
ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
{ [Error: EEXIST: file already exists, mkdir '##########/node_modules/puppeteer/.local-chromium/linux-782078']
errno: -17,
code: 'EEXIST',
syscall: 'mkdir',
path:
'##########/node_modules/puppeteer/.local-chromium/linux-782078' }
npm WARN notsup Unsupported engine for puppeteer#5.2.1: wanted: {"node":">=10.18.1"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: puppeteer#5.2.1
npm WARN notsup Unsupported engine for extract-zip#2.0.1: wanted: {"node":">= 10.17.0"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: extract-zip#2.0.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#5.2.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#5.2.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! ######/.npm/_logs/2020-07-30T16_32_37_096Z-debug.log
But that directory doesn't exist, nor does puppeteer at all within node_modules so I can't delete it and retry. I'm not sure what the installation is reffering to. Does anybody have any idea what it could mean?
Also, this is irrelevant but another concern is with the warnings saying that a node version >=10.18.1 is wanted and so 10.4.0 is unsupported, any ideas what's up with that as well?
I ended up using nvm to switch to the stable Node release (10.18.1) which resolved both the errors and the warnings. I guess there was some incompatibility with newer Node versions.

I am creating an Node.js app and I need to install ejs but I am unable to install it. It is showing me the following error

node --harmony ./postinstall.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN #react-navigation/core#3.7.5 requires a peer of react#* but
none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-area-view#0.14.9 requires a peer of react#*
but none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-area-view#0.14.9 requires a peer of
react-native#* but none is installed. You must install peer
dependencies yourself.
npm WARN react-navigation#4.3.7 requires a peer of react#* but none is
installed. You must install peer dependencies yourself.
npm WARN react-navigation#4.3.7 requires a peer of react-native#* but
none is installed. You must install peer dependencies yourself.
npm WARN ashutosh#1.0.0 No description
npm WARN ashutosh#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ejs#3.1.3 postinstall: node --harmony ./postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ejs#3.1.3 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\Ashutosh\AppData\Roaming\npm-cache_logs\2020-05-22T23_26_50_117Z-debug.log
You need to have a path to NodeJS inside your environment variables list.
On some OS reboot might be needed to make this work.
Try reboot or reinstall NodeJS and then reboot.

Node dependency/permission errors when installing expo-cli

I am trying to install expo to use react native, using npm install -g expo-cli but I get huge error logs.
I tried to chown /usr/local using sudo chown -R $(whoami) $(brew --prefix)/* /usr/local and sudo chown -R $USER /usr/local but I get chown: /usr/local: Operation not permitted. I tried updating node and npm, deleting them, reinstalling them, updating with homebrew, installing expo-cli with homebrew. I tried sudo installing. I get similar errors. I tried yarn add global expo-cli and I got almost the exact same output that I got from npm install -g expo-cli about the dependencies.
Here's the output I get in terminal from running npm install -g expo-cli:
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 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 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#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.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN #expo/dev-tools#0.5.14 requires a peer of #expo/xdl#^53.8.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 ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
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 (though this is not recommended).
When I try to use yarn add I get the same errors about dependencies but instead of the "npm ERR!" part I get:
[2/4] 🚚 Fetching packages...
info #expo/traveling-fastlane-linux#1.9.4: The platform "darwin" is incompatible with this module.
info "#expo/traveling-fastlane-linux#1.9.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-darwin-ia32#2.2.8: The CPU architecture "x64" is incompatible with this module.
info "#expo/ngrok-bin-darwin-ia32#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-arm#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-arm#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-arm#2.2.8: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-linux-arm64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-arm64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-arm64#2.2.8: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-freebsd-x64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-freebsd-x64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-freebsd-ia32#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-freebsd-ia32#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-freebsd-ia32#2.2.8: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-linux-x64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-x64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-sunos-x64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-sunos-x64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-win32-ia32#2.2.8-beta.1: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-win32-ia32#2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-win32-ia32#2.2.8-beta.1: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-win32-x64#2.2.8-beta.1: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-win32-x64#2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-ia32#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-ia32#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-ia32#2.2.8: The CPU architecture "x64" is incompatible with this module.
[3/4] 🔗 Linking dependencies...
warning "expo-cli > #expo/dev-tools#0.5.14" has incorrect peer dependency "#expo/xdl#^53.8.0".
error An unexpected error occurred: "EACCES: permission denied, unlink '/Users/<username>/node_modules/.bin/detect-libc'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/<username>/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
When I run sudo npm install -g expo-cli I get the following:
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 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 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.
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.
> #expo/traveling-fastlane-darwin#1.9.4 preinstall /usr/local/lib/node_modules/expo-cli/node_modules/#expo/traveling-fastlane-darwin
> node platform.js
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
/usr/local/bin/expo-cli -> /usr/local/lib/node_modules/expo-cli/bin/expo.js
/usr/local/bin/expo -> /usr/local/lib/node_modules/expo-cli/bin/expo.js
> fsevents#1.2.9 install /usr/local/lib/node_modules/expo-cli/node_modules/fsevents
> node install
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
> iltorb#2.4.3 install /usr/local/lib/node_modules/expo-cli/node_modules/iltorb
> node ./scripts/install.js || node-gyp rebuild
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
sh: node-gyp: command not found
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> sharp#0.22.1 install /usr/local/lib/node_modules/expo-cli/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
sh: node-gyp: command not found
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
npm WARN #expo/dev-tools#0.5.14 requires a peer of #expo/xdl#^53.8.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 optional SKIPPING OPTIONAL DEPENDENCY: #expo/traveling-fastlane-linux#1.9.4 (node_modules/expo-cli/node_modules/#expo/traveling-fastlane-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/traveling-fastlane-linux#1.9.4: wanted {"os":"win32,linux","arch":"any"} (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-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 optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-win32-ia32#2.2.8-beta.1 (node_modules/expo-cli/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-sunos-x64#2.2.8 (node_modules/expo-cli/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-x64#2.2.8 (node_modules/expo-cli/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-linux-ia32#2.2.8 (node_modules/expo-cli/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-arm64#2.2.8 (node_modules/expo-cli/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-arm#2.2.8 (node_modules/expo-cli/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-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-freebsd-x64#2.2.8 (node_modules/expo-cli/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-darwin-ia32#2.2.8 (node_modules/expo-cli/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/traveling-fastlane-darwin#1.9.4 (node_modules/expo-cli/node_modules/#expo/traveling-fastlane-darwin):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/traveling-fastlane-darwin#1.9.4 preinstall: `node platform.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/expo-cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb#2.4.3 (node_modules/expo-cli/node_modules/iltorb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb#2.4.3 install: `node ./scripts/install.js || node-gyp rebuild`
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! sharp#0.22.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sharp#0.22.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I expected the output to say something like expo installed ok but instead it gives me the error logs about dependencies and permissions.
You need to have super user access to install a package globally. Try:
sudo npm install -g expo-cli
You can use npx alternative of npm install.
I can't fix the error, but
$ npx expo init Awesomeproject
works.
The only disadvantage of using npx is taking more time than using preinstalled expo.
Try npx!
The best solution I found, as this is related to some new permissions controls in macOS is to use option 2 here: https://github.com/mixonic/docs.npmjs.com/blob/master/content/getting-started/fixing-npm-permissions.md
This changes your default home folder for global modules, which may require reinstallation of others when it’s time to update, but won’t affect those already installed.
Otherwise an unsafe method of doing it is:
sudo npm i -g --unsafe-perm expo-cli

how do I install npm packages in linux machine

I've installed nodejs v7.5.0 and npm v4.1.2 in my 32 bit linux mint machine. while I'm typin' npm install into terminal, it gives me these informations instead of being installed npm packages are:
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":"linux","arch":"ia32"})
npm WARN #angular/core#2.4.7 requires a peer of rxjs#^5.0.1 but none was installed.
npm WARN shwokat#1.0.0 No description
npm WARN shwokat#1.0.0 No repository field
Now where's my wrong? how to solve it and install npm packages correctly, please let me know?
Try sudo npm install npm -g
Go through the official guide.

Resources