nuxt: Hot Reloading Issue / This page could not be found

I tried creating apps with each of these configurations (With create-nuxt-app, but I tried without it and I had the same issue after adding a simple error page and a nuxt link to a random page to check the error page): no custom server framework, no custom UI framework, universal, no axios, no eslint, npm express, bootstrap, universal, no axios, no eslint, npm

I need to specify that I tried with https only.

After I start the dev server with npm run dev and try to go to the dev server address I see the page and it always refreshes with the following server logs: e857c1ffd95d1e108a2fc97bd8e19f30

And this chrome console output: 246e8e711a93c465026aadbc94ff6fbc

EDIT: I just tried connecting with the IP and port, not the domain, and it now works perfectly. I think the problem is from the nginx reverse proxy. Here is my configuration:

server {
    listen   443 ssl;
    
    ssl on;
    ssl_certificate /etc/nginx/ssl/api/ssl.pem;
    ssl_certificate_key /etc/nginx/ssl/api/ssl.key;

    ssl_session_timeout 5m;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    ssl_prefer_server_ciphers on;

    server_name beta.example.com;
    
    location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;
        proxy_pass              https://localhost:8443;
        proxy_read_timeout      90;
        proxy_redirect          https://localhost:8443 https://beta.example.com;
    }
}
<div align="right">This question is available on Nuxt.js community (#c2354)</div>

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 49 (5 by maintainers)

Most upvoted comments

Hi. We are sorry for inconveniences, this is a known issue with nuxt 1 and is almost resolved and will be available soon with 2.x release 😃

@tetreault Don’t worry. @galvez and I will look into all the issues with the pwa-module and bring it up to date! šŸ˜‰

Problem is still there

@mariangemarcano @DanjBethel

Clearing browser cache for localhost:3000 or whatever port you’re using for development temporarily fixes the issue. That is until you add an external resource, which causes the infinite reload again. Clearing cache again resolves it.

So, keep clearing browser cache until 2.x comes out.

@pi0 Any idea when 2.x will be released?

i can confirm when developing a static site in nuxt locally, every so often hot-update.json throws a 404 status and makes the page freak out and reload constantly. re-running npm run dev in my scenario resolves this but its pretty gnarly when this issue/bug happens.

screenshot 2018-07-11 13 40 25

I notice this for some reason tends to happen more often when developing a site and checking/tweaking it inside the ios simulator.

Encountered this same issue while upgrading to Nuxt 1 and relevant PWA, SSL, Bootstrap packages. Strangest things started happening, like params of the fetch ({ store, params }) method started returning ā€˜bootstrap.css.map’, instead of returning URL parameter of dynamic routes!

I was able to resolve it with the followings,

  • removing Bootstrap dependencies from package.json,
  • hence removing bootstrap from css property of nuxt.config.js
  • AND included Bootstrap via CDN link under head: { link: [... { href:... property of nuxt.config.js.

It took away 404-hot.update errors, including DevTool warning of sourceMappping, etc.

if there any way to bump this up in terms of priority? It now is happening constantly in the iOS simulator. I love nuxt so much but this bug really sucks.

Also related, if you run npm run generate while npm run dev is also active in another terminal tab nuxt crashes and points a finger at sw.js not being installed or available.

Having the same issue. Opening DevTools in Chrome and checking ā€œDisable Cacheā€ under Network tab temporarily solves the issue.

@DanjBethel i tried to set cssSourceMap to false but it doesnt change anything and the issue still exist, didnt find any other relevant settings, so i dont know…

I’ll second this.

I’m using Nuxt SSR with boostrap-vue and encountering exactly the same error you are - the 404 on bootstrap.css.map. This is causing serious problems for me because Chrome devtools reads the bootstrap CSS, sees this line and attempts to load the CSS map.

/*# sourceMappingURL=bootstrap.css.map */

Now, I’m using nuxt’s router which means that if the user is on the page /user/finnian, the path for the CSS map will resolve to /user/bootstrap.css.map. What happens here? The SSR code will attempt to find the user bootstrap.css.map and the whole thing explodes because it’s rendered in the same context (not sure if that’s the correct phrase here) as the original page load. This causes some very strange errors in the browser which are totally unrelated to the original problem.

screenshot 2018-02-14 22 25 15

This was pretty hard to track down but having run through all my code to no avail, I finally spotted this line in the logs that highlighted the problem:

nuxt:render Rendering url /users/finnian +0ms
nuxt:render Data fetching /users/finnian: 101ms +0ms
nuxt:render Rendering url /users/bootstrap.css.map +726ms <-- what?!

Removing the mapping line as @Duzbee suggests above should work, but that’s not a viable solution because every time npm i is run, it will overwrite the change.

I’m a bit lost on what to do next, so if anyone fancies giving me a suggestion I’d really appreciate it!

@aldarund weird, not sure if they changed something. but setting cssSourceMap to false under ā€œbuildā€ in the nuxt config file works for me now. errors are gone.

bootstrap.css.map issue fixed by removing /*# sourceMappingURL=bootstrap.css.map */ from node_modules/bootstrap/dist/css/bootstrap.css. Looks like it’s working well now.

Actually I tried to update nuxt and bootstrap-vue to latest version and the problem appeared again only on the domain. I downgraded them but even before this everytime I tried to access the server through the domain I got a 404 error for /bootstrap.css.map and in the chrome console I get a lot of there errors after a while: 2d372a25b8fb9add3267feaba3e45870

can you remove proxy_redirect from your nginx cong and retry? and also localhost:8443 (your development nuxt server) has ssl? if not please proxy_pass to http://localhost:8443