Home

Issue: 1904

[Solved] Can't make Nuxt work on Ubuntu

[issue link]

EDIT: solution at the bottom.

Node: 8.1.4
npm: 5.3.0
nuxt: 1.0.0-rc11

I develop on Windows, where I have no problems. npm install, npm run build, npm start and I can access the app on http://localhost:3000. I can set a different port as well and works just fine.

When I push the app to production (a droplet in DigitalOcean) and start the app all I get is the generic error page that says “Server error”. Nothing in the nginx logs, nothing in the console where I run npm start, nothing in the browser console (I just get a 500 error). When I curl the app though, this is what I get:

{
  "status": 500,
  "message": "initProxy is not a function",
  "name": "TypeError"
}

I’ve also tried using Vagrant (a Homestead box specifically) and it’s pretty much the same when I curl within the virtual machine, except the message is argument str must be a string.

Homestead: Ubuntu 16.04
Server: Ubuntu 14.04.3

This question is available on Nuxt.js community (#c1704)