Vapid deploy on windows not working


#1

Hello,

I am trying to deploy my vapid website to Vapid Hosting by running:
vapid deploy .
It is stuck on
==> Deploying your website…
(tried to let it run for half an hour without any result).
I am on windows 10 with latest of vapid (0.2.2).

Anyone facing the same issue?


#2

@thibaudlacan That doesn’t sound good. Deployment should kick off and complete within a few seconds. I have a couple of questions:

  1. Does your site contain any large files (e.g. over 5MB), or a high number of files?
  2. Can you ping or curl api.vapid.com?

#3

Thanks @scott for your reply.

  1. No, only small files, it’s a tiny one page website, so no high number of files either

  2. I’m getting time out when ping:

    Pinging api.vapid.com [34.206.133.72] with 32 bytes of data:
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.

    Ping statistics for 34.206.133.72:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


#4

Sorry, I just realized that you won’t be able to ping the server. Can you try curl api.vapid.com?


#5
C:\WINDOWS\system32>curl api.vapid.com
Redirecting to <a href="https://api.vapid.com/">https://api.vapid.com/</a>.

#6

I have the same issue - on a mac and I can’t get it to deploy.

Any ideas?


#7

Figured it out. Needed to shut down the production enviroment before deploying, haha.


#8

What do you mean by that?
I’m still stuck at:
image


#9

Shut down the local server (ctrl + c) I presume (or just close terminal). Reboot again, and then first you do is “vapid deploy projectname


#10

@thibaudlacan Sorry, I missed your earlier reply re: curl.

Well, it’s good that your computer is at least seeing api.vapid.com—that rules out network issues. A few more questions:

  • What version of Node are you running?
  • Are you CSS/JS rendering correctly when you run your local development server (i.e., vapid start)?
  • The first time you ran vapid deploy did you see a message saying “Please enter your Vapid credentials…”?

#11

@scott no problem :slight_smile:

  • Node: v10.9.0
  • It’s rendering perfectly fine, admin is working and all with vapid start
  • Yes it prompt me to enter my credentials the first time

This leads me to another question, on the meantime i could deploy through a friend’s Mac where she is able to deploy to her beta hosting, but she would need to logout and login with my account to deploy. Is there a command to logout?


#12

Let’s try a few things before having you bug your friend. Re: logout, right now there isn’t a command, but you can delete the Vapid entry in ~/.netrc.

First, let’s see if it can successfully create a tmp directory:

cd /your/project/directory
node

Then run the following in the Node prompt:

const tmp = require('tmp');
const { resolve } = require('path');
const { writeFileSync } = require('fs');
const { execSync } = require('child_process');
const { name: tmpDir } = tmp.dirSync();
const tmpFile = resolve(tmpDir, 'test.txt');

console.log(`DIR: ${tmpDir}`);
console.log(`FILE: ${tmpFile}`);
writeFileSync(tmpFile, 'Hello world');
execSync(`start notepad "${tmpFile}"`);
.exit

If it works, you should see the text file. If not, hopefully we’ll see an error.

On a related note, you may be able to look in the tmpDir on your system, and see if you find other attempted deploys.


#13

Okay, probably getting there then :slight_smile:

Error: Cannot find module 'tmp'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)

#14

Ah, sorry, I think you might have to do one more step first, and install the node packages:

cd /your/project/directory
npm install
node

Then try to run the tmp stuff again.


#16

Moving this to a private message, so we can share info. Will post the final solution back to this thread…


#17

This is now solved with latest vapid-cli.
You just need to run:

npm -g install vapid-cli

Thanks for your support Scott