bundle-wizard icon indicating copy to clipboard operation
bundle-wizard copied to clipboard

Failed to generate source map visualization

Open probil opened this issue 5 years ago • 2 comments
trafficstars

$ npx bundle-wizard app.laserhub.com

Produces:

🧙‍  Welcome to bundle-wizard

🤖  Loading https://app.laserhub.com ...

🐢  Finishing up loading...

📋  Writing coverage file to disk...

⬇️   Downloading sourcemaps...

🖼️   Generating visualization...

⚠️  Failed to generate source map visualization
{
  bundles: [],
  errors: [
    {
      bundleName: '/Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/temp/downloads/4558822.js',
      code: 'Unknown',
      message: '"version" is a required argument.',
      error: Error: "version" is a required argument.
          at Object.getArg (/Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/node_modules/source-map/lib/util.js:24:11)
          at /Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/node_modules/source-map/lib/source-map-consumer.js:207:28
          at async loadSourceMap (/Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/node_modules/source-map-explorer/dist/explore.js:45:16)
          at async Object.exploreBundle (/Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/node_modules/source-map-explorer/dist/explore.js:29:25)
          at async Promise.all (index 0)
          at async explore (/Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/node_modules/source-map-explorer/dist/api.js:31:19)
          at async visualizeBundles (/Users/max/.npm/_npx/14980/lib/node_modules/bundle-wizard/src/functions/visualizeBundles.js:21:18)
    }
  ]
}

node -v -> v14.4.0
Mac OS Catalina: 10.15.6

probil avatar Jul 18 '20 16:07 probil

Hi, when I looked at the website it seems like there aren't any sourcemaps being served. There's only one that gets resolved and that's for hubspot, but it looks like {"status":"error","message":"unparseable url","correlationId":"5f4240d3-9329-483b-965e-ac34fe5bd8f5"}. Is it possible your site isn't serving sourcemaps? If so you might want to try the tool on a local build instead.

aholachek avatar Jul 18 '20 20:07 aholachek

Hi, @aholachek Yeah, the website doesn't provide sourcemaps. I wonder whether it's possible to detect that by the util 🤔 so a proper message can be printed in the console

probil avatar Jul 19 '20 11:07 probil