Issue deploying to Glitch


#1

I tried to deploy a Vapid site to Glitch, and nothing is showing up.

Any steps we need to make other than syncing our github repo?

Just checked the logs on Glitch and got the following error when I tried using vapid start . :

/rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:135
      throw err;
      ^
    Error: Could not locate the bindings file. Tried:
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/build/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/build/Debug/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/build/Release/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/out/Debug/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/Debug/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/out/Release/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/Release/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/build/default/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/compiled/10.15.0/linux/x64/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/addon-build/release/install-root/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/addon-build/debug/install-root/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/addon-build/default/install-root/sharp.node
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/lib/binding/node-v64-linux-x64/sharp.node
        at bindings (/rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:126:9)
        at Object.<anonymous> (/rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/lib/constructor.js:10:34)
        at Module._compile (internal/modules/cjs/loader.js:689:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
        at Module.load (internal/modules/cjs/loader.js:599:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
        at Function.Module._load (internal/modules/cjs/loader.js:530:3)
        at Module.require (internal/modules/cjs/loader.js:637:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/lib/index.js:3:15)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! dfw@ start: vapid start .
     → /rbd/pnpm-volume/7eeb2e09-4829-45cb-8e08-fdc381d72e61/node_modules/.registry.npmjs.org/sharp/0.21.3/node_modules/sharp/build/sharp.node
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the dfw@ start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /tmp/npm-cache/10.15.0/_logs/2019-03-05T21_16_27_057Z-debug.log

To confirm, I am able to get the site running on my local machine.


#2

@scott are you able to assist?


#3

@PHironaka Do you have the link to the Glitch install?

Also, to set expectations, this forum is a free, community support option. Typically, you’ll see a response from someone (not just me) in 24-48 hours, but that’s not always the case. And in situations that involve third-party software, like Glitch, we may not always be able to help resolve the issue.


#4

@scott thanks, here is the link to the code:


#5

Hey, just had a similar issue on Digital Ocean, and here’s how i fixed it:

sudo node install/libvips 
sudo npm install @vapid/cli -g --unsafe-perm

I’m not sure whether installing libvips or using --unsafe-perm solved it.

Btw, @scott, the instructions mentioned on the website/wiki are outdated. An official version would be great!


#6

@PHironaka I’m not entirely sure what’s happening on Glitch, but it looks similar to this issue:

That said, I tried the git prune; git gc recommendation, and it didn’t work for me. I wouldn’t be surprised it: 1) we’re starting to hit the limits of Glitch being a viable option to test Vapid; and/or 2) recently added packages like sharp are just too much for their platform.

On a related note, I looked into your note about not being able to get it running on Heroku as well. I’m able to deploy the site, but the CSS compilation fails. The reason being, I’m making a bad, relative reference to Flatpickr’s stylesheet. I’ll look into fixing that.

Lastly, I see in your Glitch README file that you’re Dockerizing Vapid. I would love to formalize that, and bring it into the GitHub repo. It seems like that would be an incredibly useful thing to have, so we can institutionalize all of the setup todos like @walidvb mentioned, and deploy easily on any Docker-ready platform.