Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when Analyzing bundle (source-map-explorer). #12431

Open
TechNech opened this issue May 23, 2022 · 6 comments
Open

Error when Analyzing bundle (source-map-explorer). #12431

TechNech opened this issue May 23, 2022 · 6 comments

Comments

@TechNech
Copy link

TechNech commented May 23, 2022

I would like to point out an issue I am facing. I followed the exact steps in this docs but unfortunately when I try to run npm run analyze it gives the following error:

npm run analyze

> [email protected] analyze
> source-map-explorer build/static/js/*.js

build/static/js/main.0e109ef0.js
  You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer

npm run build was successful.

Can anyone look into this please.

Thanks!

@krreet
Copy link
Contributor

krreet commented May 23, 2022

Same as parcel-bundler/parcel#8005 and gatsbyjs/gatsby#35607?

Try forcing resolution "source-map": "^0.8.0-beta.0"

@fitterfizzle
Copy link

fitterfizzle commented May 24, 2022

I have the same issue, on my end even yarn build fails with the same error message. Also tried npm run build

You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
 "dependencies": {
    "source-map": "^0.8.0-beta.0",

This also doesn't help

@krreet
Copy link
Contributor

krreet commented May 24, 2022

I have the same issue, on my end even yarn build fails with the same error message. Also tried npm run build

You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
 "dependencies": {
    "source-map": "^0.8.0-beta.0",

This also doesn't help
Try this?
parcel-bundler/parcel#8005 (comment)

@fitterfizzle
Copy link

I have the same issue, on my end even yarn build fails with the same error message. Also tried npm run build

You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
 "dependencies": {
    "source-map": "^0.8.0-beta.0",

This also doesn't help
Try this?
parcel-bundler/parcel#8005 (comment)

This works locally however with GitLab CI it still fails

$ env-cmd -f .env.int react-scripts --no-experimental-fetch build

@nickserv
Copy link
Contributor

nickserv commented Jun 4, 2022

I get this error when running react-scripts start.

@aconrad
Copy link

aconrad commented Aug 4, 2022

This is how I got it to work in package.json:

{
  "scripts": {
    "analyze": "NODE_OPTIONS=--no-experimental-fetch source-map-explorer 'build/static/js/*.js'"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants