rstudio / shiny-server

Host Shiny applications over the web.
https://rstudio.com/shiny/server
Other
712 stars 290 forks source link

node js seems not installed while building shiny-server #475

Closed kutsukos closed 2 years ago

kutsukos commented 3 years ago

Hello.

Recently I followed steps from Building-Shiny-Server-from-Source, to build shiny-server from source as stable build.

When it was time to "Recompile the npm modules included in the project", I had the following errors. Those errors were solved when I installed nodejs on my system sudo apt-get install nodejs, which is odd.

/shiny-server/tmp$ (cd .. && sudo ./bin/node ./ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild)
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@12.20.0 | linux | x64
gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/shiny-server/ext/node/lib/node_modules/npm/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   '/shiny-server/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/12.20.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/12.20.0',
gyp info spawn args   '-Dnode_gyp_dir=/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/12.20.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/shiny-server',
gyp info spawn args   '-Dnode_engine=v8',
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 info spawn args ]
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-58-generic
gyp ERR! command "/shiny-server/ext/node/bin/node" "/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /shiny-server
gyp ERR! node -v v12.20.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

System is Ubuntu 20.04 Server with all the prerequisites.

jcheng5 commented 2 years ago

This should be fixed now--1) that line wasn't really needed anymore anyway, 2) an earlier line adds our bin dir to the path, it's possible that line wasn't there when this issue was filed though.