npm install hangs on Google Cloud Compute Engine VM

127 Views Asked by At

I'm trying to get a Medusa backend to run on a Google Cloud Compute Engine VM. When running npm i --verbose the command always hangs with the last line printed being:

reify:@swc/core-darwin-arm64: http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk

I have tried the following with no luck:

  1. Changing npm (and node) versions
  2. Deleting the node_modules folder and re-running npm i
  3. Clearing the npm cache
  4. Disabling ipv6 on the VM

The GCE VM has an external IP address and is able to wwget google.com so it's not a connectivity issue. The same command runs fine on my Chromebook (Crostini)

Any ideas as to what might be causing npm i to hang indefinitely (or at least for a very long time)?

1

There are 1 best solutions below

0
On

It turns out the VM was running out of resources (CPU I believe). An e2-micro VM is not enough. After upgrading to e2-medium things started to work.