Next.js: Error 404 SourceMap Next5

Created on 10 Feb 2018  路  6Comments  路  Source: vercel/next.js

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Steps to Reproduce (i don't know if bugs)


  1. Upgrade to version 5 of next
  2. In dev mode the terminal tells me the 404 error of the js source map
  3. Keep running my application, but the message bothers me, I do not know if it's ok

Context



My big mental problem, is not knowing if this is a normal behavior or I have something wrong with my next application configuration or in the browser.
Terminal:

DONE Compiled successfully in 3408ms
"GET /_next/-/manifest.js.map HTTP/1.1" 404 Chrome/63.0.3239.132 Safari/537.36
"GET /_next/-/commons.js.map HTTP/1.1" 404 Chrome/63.0.3239.132 Safari/537.36
"GET /_next/-/main.js.map HTTP/1.1" 404 Chrome/63.0.3239.132 Safari/537.36

Your Environment


| Tech | Version |
|---------|---------|
| next | v5.0.0 |
| node | v8.9.4 |
| OS | macos sierra |
| browser | google chrome |

Most helpful comment

I'm experiencing the same issue. I receive a 404 for the various sourcemap paths, e.g. /_next/-/manifest.js.map. I'm using a custom server and those requests are passing through the same handler as all others, but the others are working fine, e.g. /_next/-/common.js, /_next/-/main.js , etc. I see the manifest.js.map file sitting in my .next directory, alongside common.js, main.js, and others, but for whatever reason the handler is returning a 404 for the .map files.

I've resorted to using @hipabloangel's workaround above, but I'd rather not have to do that, and it's making my bundles much larger with all of the inlined sourcemaps.

All 6 comments

the solution was to change the devtool in next.config.js and it gave me results it does not leave error, but it is because of some chrome google theme so I still do not know if it will be ok or not

'use strict'

module.exports = {
    useFileSystemPublicRoutes: false,
    webpack(config, { dev }) {
        if(dev) {
            config.devtool = 'cheap-module-eval-source-map'
        }
        return config;
    }
}

I'm experiencing the same issue. I receive a 404 for the various sourcemap paths, e.g. /_next/-/manifest.js.map. I'm using a custom server and those requests are passing through the same handler as all others, but the others are working fine, e.g. /_next/-/common.js, /_next/-/main.js , etc. I see the manifest.js.map file sitting in my .next directory, alongside common.js, main.js, and others, but for whatever reason the handler is returning a 404 for the .map files.

I've resorted to using @hipabloangel's workaround above, but I'd rather not have to do that, and it's making my bundles much larger with all of the inlined sourcemaps.

This may have been fixed by https://github.com/zeit/next.js/pull/3969

It's a combination of a few things @ptomasroos worked on, try upgrading to next@canary 馃憤

I'm on next@canary, and still getting that 404 for the manifest.js.map. 馃槙

Right. I never added manifest.js.map since I was looking at production builds mainly. I can def fix that quickly for development

Was this page helpful?
0 / 5 - 0 ratings