Warning error running install script for optional dependency
See original GitHub issueHey, folks! I couldn’t install it neither with Node v6.6.0 nor v7.7.1. Here’s the log:
Creating a new React Native app in /home/vinicius/Documents/code/my-app.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
yarn add v0.20.3
info No lockfile found.
[1/4] Resolving packages...
warning react-native-scripts > xdl > node-uuid@1.4.7: use uuid module instead
warning react-native-scripts > xdl > @exponent/ngrok > node-uuid@1.4.7: use uuid module instead
warning react-native-scripts > xdl > auth0-js > xtend > object-keys@0.4.0:
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/5] ⠄ @exponent/ngrok: ngrok - downloading binary https://bin.equinox.io/c/6raCnPaTf2c/ngrok-beta-linux-amd64.tgz ...
[-/5] ⠄ waiting...
[3/5] ⠄ ref: '-Goutput_dir=.' ]
[4/5] ⠄ runas: '-Goutput_dir=.' ]
warning Error running install script for optional dependency: "/home/vinicius/Documents/code/my-app/node_modules/runas: Command failed.\nExit code: 1\nCommand: sh\nArguments: -c node-gyp rebuild\nDirectory: /home/vinicius/Documents/code/my-app/node_modules/runas\nOutput:\ngyp info it worked if it ends with ok\ngyp info using node-gyp@3.5.0\ngyp info using node@7.7.1 | linux | x64\ngyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR\ngyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR\ngyp info spawn /usr/bin/python2\ngyp info spawn args [ '/usr/share/yarn/node_modules/node-gyp/gyp/gyp_main.py',\ngyp info spawn args 'binding.gyp',\ngyp info spawn args '-f',\ngyp info spawn args 'make',\ngyp info spawn args '-I',\ngyp info spawn args '/home/vinicius/Documents/code/my-app/node_modules/runas/build/config.gypi',\ngyp info spawn args '-I',\ngyp info spawn args '/usr/share/yarn/node_modules/node-gyp/addon.gypi',\ngyp info spawn args '-I',\ngyp info spawn args '/home/vinicius/.node-gyp/7.7.1/include/node/common.gypi',\ngyp info spawn args '-Dlibrary=shared_library',\ngyp info spawn args '-Dvisibility=default',\ngyp info spawn args '-Dnode_root_dir=/home/vinicius/.node-gyp/7.7.1',\ngyp info spawn args '-Dnode_gyp_dir=/usr/share/yarn/node_modules/node-gyp',\ngyp info spawn args '-Dnode_lib_file=node.lib',\ngyp info spawn args '-Dmodule_root_dir=/home/vinicius/Documents/code/my-app/node_modules/runas',\ngyp info spawn args '--depth=.',\ngyp info spawn args '--no-parallel',\ngyp info spawn args '--generator-output',\ngyp info spawn args 'build',\ngyp info spawn args '-Goutput_dir=.' ]\ngyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR\ngyp info spawn make\ngyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]\nmake: Entering directory '/home/vinicius/Documents/code/my-app/node_modules/runas/build'\n CXX(target) Release/obj.target/runas/src/main.o\nmake: g++: Command not found\nmake: *** [Release/obj.target/runas/src/main.o] Error 127\nrunas.target.mk:96: recipe for target 'Release/obj.target/runas/src/main.o' failed\nmake: Leaving directory '/home/vinicius/Documents/code/my-app/node_modules/runas/build'\ngyp ERR! build error \ngyp ERR! stack Error: `make` failed with exit code: 2\ngyp ERR! stack at ChildProcess.onExit (/usr/share/yarn/node_modules/node-gyp/lib/build.js:276:23)\ngyp ERR! stack at emitTwo (event[1/5] ⡀ @exponent/ngrok: ngrok - downloading binary https://bin.equinox.io/c/6raCnPaTf2c/ngrok-beta-linux-amd64.tgz ...
[-/5] ⡀ waiting...
[3/5] ⡀ ref: '-Goutput_dir=.' ]
[4/5] ⡀ runas: ERR! not ok
error /home/vinicius/Documents/code/my-app/node_modules/ref: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-gyp rebuild
Directory: /home/vinicius/Documents/code/my-app/node_modules/ref
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.5.0
gyp info using node@7.7.1 | linux | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/share/yarn/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/vinicius/Documents/code/my-app/node_modules/ref/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/share/yarn/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/vinicius/.node-gyp/7.7.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/vinicius/.node-gyp/7.7.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/share/yarn/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/vinicius/Documents/code/my-app/node_modules/ref',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/vinicius/Documents/code/my-app/node_modules/ref/build'
CXX(target) Release/obj.target/binding/src/binding.o
make: g++: Command not found
binding.target.mk:94: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: Leaving directory '/home/vinicius/Documents/code/my-app/node_modules/ref/build'
make: *** [Release/obj.target/binding/src/binding.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/yarn/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-21-generic
gyp ERR! command "/home/vinicius/.nvm/versions/node/v7.7.1/bin/node" "/usr/share/yarn/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vinicius/Documents/code/my-app/node_modules/ref
gyp ERR! node -v v7.7.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
`yarnpkg add --dev --exact react-native-scripts` failed
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Yarn add/Yarn install cannot install fsevents · Issue #3926
warning Error running install script for optional dependency : "/Users/Ystartsev/Work/temp/debugger.html/node_modules/fsevents: Command failed.\ ...
Read more >Yarn, node-gyp rebuild compile error, node_modules/fsevents
⠈ fsevents warning Error running install script for optional dependency: "/Users/whitebear/CodingWorks/httproot/myinvestlist/node_modules/ ...
Read more >Ran into a bunch of errors when trying to install the mobile dev ...
warning Error running install script for optional dependency: "/usr/local/developer/mobile-sdk/8.0.502-1.4.2-2/node_modules/librsvg: Command failed.
Read more >macOS ARM Local installation issues - Ghost Forum
I ran the following steps: Ran npm install ghost-cli@latest -g ... ERR! not ok warning Error running install script for optional dependency: ...
Read more >Dependency installation error on fsevents 1.2.4 with Node.js 12
We can't install indirect dependency fsevents 1.2.4 Node module with Node.js 12 on macOS. log. warning Error running install script for optional ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rtpm cool – makes sense. I’m going to prioritize making ((Windows + yarn) - MSVC) work well right now, and I can revisit docker support soon.
Works fine for me using npm (yarn uninstalled)