apex / up-examples

Example apps, apis, and sites for Up.
389 stars 42 forks source link

node-nuxt #69

Closed lifeiscontent closed 5 years ago

lifeiscontent commented 6 years ago

Hey @tj thanks for all the hard work.

I tried testing out the node-nuxt example but it doesn't seem to deploy for me.

the actions I took were the following:

  1. download the source
  2. run up
  3. visit provided url from up url
  4. receive the following error {"message": "Internal server error"}

here's the logs

  10:03:10am INFO START RequestId: 145ce650-1846-11e8-858b-57c8ff8515c6 Version: 1
  10:03:10am INFO initializing
  10:03:10am INFO found free port - port: 37821 stage: staging version: 1
  10:03:10am INFO executing - command: nuxt start stage: staging version: 1
  10:03:10am INFO proxy started - pid: 15 stage: staging version: 1
  10:03:10am INFO starting server - stage: staging url: http://127.0.0.1:37821 version: 1
  10:03:11am ERRO /var/task/node_modules/nuxt/lib/core/module.js:14
  async ready() {
        ^^^^^ - stage: staging version: 1
  10:03:12am ERRO SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/var/task/node_modules/nuxt/lib/core/index.js:2:16) - stage: staging version: 1
  10:03:25am FATA error selecting handler: waiting for http://127.0.0.1:37821 to be in listening state: timed out after 15s - name: node-nuxt type: server
  10:03:25am INFO 2018-02-23T03:03:25.636Z  145ce650-1846-11e8-858b-57c8ff8515c6    Error: read ECONNRESET
    at exports._errnoException (util.js:1018:11)
    at Pipe.onread (net.js:568:26)
  10:03:25am INFO END RequestId: 145ce650-1846-11e8-858b-57c8ff8515c6
  10:03:25am INFO REPORT RequestId: 145ce650-1846-11e8-858b-57c8ff8515c6    Duration: 15315.05 ms   Billed Duration: 15400 ms   Memory Size: 512 MB Max Memory Used: 54 MB
  10:03:25am INFO RequestId: 145ce650-1846-11e8-858b-57c8ff8515c6 Process exited before completing request

looks like there's an issue with some es6 code, but I'm not sure what the right way to handle this is, any advice would be much appreciated.

Thanks!

tj commented 6 years ago

hmm removing it for now, seems busted in general, i'm not familiar with it

lukeed commented 6 years ago

As of Nuxt 1.x, it requires Node 8.x to be running. That's why the async syntax threw the error. At the time the example was added, Nuxt was still in RC stages & was compatible with Node 6.x.

That said, I've no idea if Nuxt added a way to handle relative routing and relative asset links. That's what caused the README notice for this example requiring a custom domain / root path.

tj commented 6 years ago

ahhh I didn't try with 1.0.0-rc11 instead of ^1.0.0-rc11 — looks like it supports a base path https://nuxtjs.org/api/configuration-router/

lukeed commented 6 years ago

Right. At least during time of RC, the base path affected routing, but not asset links. Whereas changing publicPath (webpack) fixed assets but overwrote/killed base path 😆

tj commented 6 years ago

ohhh yeah good point, damn hahah well I guess I'll have to prioritize my vanity url thingy for when I get back to Victoria!

lukeed commented 6 years ago

😆 Where are you now? ⛰

chanlito commented 6 years ago

so I deploy a nuxt app with up fine, but there's a problem with the routing "/staging/", anyone found a workaround for this?

bart commented 5 years ago

Any updates on this?