Home

Issue: 1724

Can't Change Port

[issue link]

I’ve added the following code to my nuxt.config.js file (but it doesn’t seem to work):

  env: {
    "scripts": {
      "dev": "PORT=3333 nuxt"
    }
  },

I can only access my site at localhost:3000 not at localhost:3333
Any idea why it’s not working right?

The following also does not work:

  env: {
    "scripts": {
      "dev": "HOST=0.0.0.0 PORT=3333 nuxt"
    }
  },

When I try that, I first get an error:

 ERROR  Failed to compile with 1 errors          17:30:04

 error  in ./.nuxt/client.js

Module build failed: Error: ENOENT: no such file or directory, open '/Users/moshemo/Sites/nuxt/vuebulma/.nuxt/client.js'

 @ multi webpack-hot-middleware/client?name=client&reload=true&timeout=3000&path=/__webpack_hmr ./.nuxt/client.js

Then it compiles successfully at localhost:3000

Any idea what I am doing wrong?

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