create-react-native-app: Warning error running install script for optional dependency

Hey, 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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 9
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@rtpm cool – makes sense. I’m going to prioritize making ((Windows + yarn) - MSVC) work well right now, and I can revisit docker support soon.