menu
Channels
Team

Cannot GET / after successful deploy

March 20, 2019 at 2:05pm

Cannot GET / after successful deploy

March 20, 2019 at 2:05pm

Hi

My project is suddenly throwing an error once the deploy completes:

Cannot GET / https://this-works-c6muesxx4.now.sh/

I have a few projects that are working fine and the config for this is just the same as the others (except in name).

{
"name": "this-works",
"version": 2,
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/now-builder",
"config": {
"serverFiles": [
"api/**"
]
}
}
],
"routes": [
{
"src": "/_nuxt/.+",
"headers": {
"cache-control": "s-maxage=31536000"
}
},
{
"src": "/(.*)",
"dest": "/"
}
]
}

If I run: now logs https://this-works-c6muesxx4.now.sh/ I don't see any issues.

It's a bit of a mystery...any ideas?

Thanks!


March 20, 2019 at 2:17pm

Can you give us a screenshot of the "Output" in '/_src'.

  • reply
  • like

March 21, 2019 at 9:28am

Can you give us a screenshot of the "Output" in '/_src'.

Sure thing...just the file structure? Or anything specific?

  • reply
  • like

I'm also using the latest Cli version 14.2.2

  • reply
  • like
  • reply
  • like

It seems this is related to your app, unfortunately. Can you console.log a few things in your lambda to see what is going on?

  • reply
  • like

The Lambda file in the output? It says I cannot view it. I'm not really sure what you're asking as I don't create this myself.

  • reply
  • like

Can you see the logs and the request being made there?

  • reply
  • like

I think it's a error with nuxtjs. Did you try the next production build locally ?

  • reply
  • like

Oddly, now running now takes a lifetime then errors out. If I check the logs I get:

Error: Unable to update lock within the stale threshold
at options.fs.stat (/tmp/9c01ee2/node_modules_dev/proper-lockfile/lib/lockfile.js:121:25)
at /tmp/9c01ee2/node_modules_dev/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:153:5)

I have tried removing my lockfile, reinstalling dependencies...updating things. Nothing is working.

If I run npm run build locally it works...though with some warning messages regarding CSS grid for IE.

Any ideas at all? I'm lost on this.

  • reply
  • like

No idea. Do you have a repository that we can deploy?

  • reply
  • like

No idea. Do you have a repository that we can deploy?

Hi Paulo, I can invite you as a user into the GitHub repo, would that be okay? If you let me know your GitHub username I can do that now. Thanks

Edited
  • reply
  • like

March 25, 2019 at 4:59pm

@paulogdm Would I be able to invite you to my repo on GitHub to take a look? I can no longer deploy the app to Now and it's confusing me very much. I have tried everything I possibly can so far.

  • reply
  • like

Sure! First, are you sure this is not a nuxt specific bug? It seems we have multiple reports of problems in the past couple of days.

  • reply
  • like

There may very well be a Nuxt issue...however, I've even tried rolling back to a version I know works in another project but I get the same issue. Is there some kind of cache within Now with regard to package.json dependencies that could mean that they aren't truly in sync?

  • reply
  • like

There may very well be a Nuxt issue...however, I've even tried rolling back to a version I know works in another project but I get the same issue. Is there some kind of cache within Now with regard to package.json dependencies that could mean that they aren't truly in sync?

You can try to lock the version of the builder! Maybe "@nuxtjs/now-builder@????"?

  • reply
  • like

@paulogdm I believe I have tracked down the culprit to an official Nuxt module for Google Analytics:

@nuxtjs/google-analytics

When I remove this from my nuxt.config.js file it deploys just fine to Zeit Now.

Interestingly, every deploy technically deployed fine...it's just that on the frontend I could see the initial above error that started this thread. From the console I never saw any warning or errors relating to this when running the now command.

To whom I file a bug with I don't know, as I'm not sure what the errors being created are.

Edited
  • reply
  • like

Maybe it is NCC? Create a new issue in the Nuxt repo asking for directions, I think they should be the first to take a look...

  • reply
  • like

March 29, 2019 at 7:25am

Hello, I have the same problem. The @nuxtjs/google-analytics module didnt fix it for me. Is there any progress?

  • reply
  • like