cloudnode npm install fails with gateway timeout

544 views
Skip to first unread message

Mark Landry

unread,
Mar 2, 2014, 10:17:51 PM3/2/14
to clou...@googlegroups.com
cloudnode info installing these npm packages: steam
cloudnode ERROR [HTTP 504] <html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>


the package takes a while on my local machine to install, wondering if there is a way to fix this. 

Hans Schroeder

unread,
Mar 3, 2014, 2:35:29 PM3/3/14
to clou...@googlegroups.com
Hi,

I am not sure where the timeout is happening. Maybe it is the NPM registry. Does it happen when you run npm via the cloudnode-cli? If so, you can add the dependency to package.json and let the dependency
be resolved when pushing to git.

Another idea is to explicitly load one of the bigger dependencies of steam to split the load time.

- Hans

Mark Landry

unread,
Mar 6, 2014, 10:36:19 PM3/6/14
to clou...@googlegroups.com
Thanks! I did both and it fixed the problem

the other problem that I am now having is with node-gyp :

/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:54
    throw new Error(
          ^
Error: node-gyp requires that the user's home directory is specified in either of the environmental variables HOME or USERPROFILE
    at new Gyp (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:54:11)
    at gyp (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:43:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:20:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
npm ERR! weird error 8
npm ERR! not ok code 0

Hans Schroeder

unread,
Mar 8, 2014, 4:48:40 AM3/8/14
to clou...@googlegroups.com

Its an issue. It seems like node-gyp can't find a home directory. 

 // set the dir where node-gyp dev files get installed
 // TODO: make this *more* configurable?
 //       see: https://github.com/TooTallNate/node-gyp/issues/21
 var homeDir = process.env.HOME || process.env.USERPROFILE
 if (!homeDir) {
   throw new Error(
     "node-gyp requires that the user's home directory is specified " +
     "in either of the environmental variables HOME or USERPROFILE"
   );
 }
 this.devDir = path.resolve(homeDir, '.node-gyp')


You can try to set an environment variable: HOME=/mnt 

  1. Goto Applications
  2. Select your app and click Manage
  3. Click Environment
  4. Click New and enter Home as key and /mnt as value
  5. Save

- Hans

P.S. Let me know if that works. I will then set the variable per default.

Hans Schroeder

unread,
Jul 6, 2014, 3:43:40 PM7/6/14
to clou...@googlegroups.com
Node-gyp is now working out of the box. Manual changes are not necessary anymore.
Reply all
Reply to author
Forward
0 new messages