Search code examples
node.jsvue.jscloud9nuxt.js

Can't open Nuxt.js starter template at Cloud9


Can't open Nuxt.js starter template in the browser (I see Cloud9 page: No application seems to be running here! Cloud9 can't get you to your requested workspace...).

Сhosen template is Blank.

Node.JS installed by NVM and I choose version v6.10.2 (Latest LTS: Boron)

Little editing package.json of nuxt.js starter template, cause default port is 3000, but in c9 available only 8080, 8081, 8082 :

  "config": {
    "nuxt": {
      "port": "8080"
       }
  },

Then I run app (npm run dev) and see everything is ok in console:

[email protected] dev /home/ubuntu/workspace/mytemplateapp
> nuxt

nuxt:build App root: /home/ubuntu/workspace/mytemplateapp +0ms
nuxt:build Generating .nuxt/ files... +1ms
Ready on http://127.0.0.1:8080
nuxt:build Generating routes... +14ms 
nuxt:build Generating files... +9ms
nuxt:build Adding webpack middleware... +17
Build completed in 4.204s


DONE  
Compiled successfully in 4210ms                                                                                                                            
Open http://127.0.0.1:8080

I've already tried all three available ports.

Well, I am stuck. I would appreciate any advice


Solution

  • try this:
    1. in your package.json

    "config": {
      "nuxt": {
       "port": 8080,
       "host": "0.0.0.0"
      }
    }
    
    1. run npm run dev (if it doesn't work use sudo npm run dev)
    2. click the link which shows on cloud9 terminal

    then you get it