You must provide the URL of lib/mappings.wasm by calling `SourceMapConsumer.initialize`

See original GitHub issue

Preliminary Checks

Please make sure that you verify each checkbox and follow the instructions for them.

Description

I have a new laptop and I am setting up my environment following the Gatsby tutorial.. I am running into issues when I get to the step to “Run your site locally” specifically with the gatsby develop command. I get a webpack error on two files.

I have not made it to the step to make my first commit to my GitHub repo, so the repo linked is the new repo without my initial commit (not a Gatsby site).

Reproduction Link

https://github.com/benackles/whatsgatsby

Steps to Reproduce

  1. Run gatsby develop
  2. Get two ERROR #98123 WEBPACK errors

Expected Result

Successfully fire up locally

Copycopy code to clipboard
You can now view whatsgatsby in the browser.
⠀
  http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and
schema
⠀
  http://localhost:8000/___graphql

Actual Result

ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({
'lib/mappings.wasm': ... }) before using SourceMapConsumer

File: .cache/app.js


ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({
'lib/mappings.wasm': ... }) before using SourceMapConsumer

File: .cache/polyfill-entry.js

failed Building development bundle - 3.925s
ERROR in ./.cache/app.js
Module build failed (from 
./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js):
Error: You must provide the URL of lib/mappings.wasm by calling 
SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
   at readWasm
(/Users/benjamins/Sites/whatsgatsby/node_modules/source-map/lib/read-wasm.js:8:13)
   at wasm (/Users/benjamins/Sites/whatsgatsby/node_modules/source-map/lib/wasm.js:25:16)
   at /Users/benjamins/Sites/whatsgatsby/node_modules/source-map/lib/source-map-consumer.
js:264:14
   at Object._loader (/Users/benjamins/Sites/whatsgatsby/node_modules/@pmmmwh/react-refre
sh-webpack-plugin/loader/index.js:81:9)

ERROR in ./.cache/polyfill-entry.js
Module build failed (from 
./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js):
Error: You must provide the URL of lib/mappings.wasm by calling 
SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
   at readWasm
(/Users/benjamins/Sites/whatsgatsby/node_modules/source-map/lib/read-wasm.js:8:13)
   at wasm (/Users/benjamins/Sites/whatsgatsby/node_modules/source-map/lib/wasm.js:25:16)
   at /Users/benjamins/Sites/whatsgatsby/node_modules/source-map/lib/source-map-consumer.
js:264:14
   at Object._loader (/Users/benjamins/Sites/whatsgatsby/node_modules/@pmmmwh/react-refre
sh-webpack-plugin/loader/index.js:81:9)

develop compiled with 2 errors

Environment

System:
    OS: macOS 12.2.1
    CPU: (8) arm64 Apple M1
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 18.0.0 - /opt/homebrew/bin/node
    npm: 8.9.0 - /opt/homebrew/bin/npm
  Languages:
    Python: 2.7.18 - /usr/bin/python
  Browsers:
    Chrome: 101.0.4951.54
    Safari: 15.3
  npmPackages:
    gatsby: ^4.13.1 => 4.13.1
    gatsby-plugin-gatsby-cloud: ^4.13.0 => 4.13.0
    gatsby-plugin-image: ^2.13.0 => 2.13.0
    gatsby-plugin-manifest: ^4.13.0 => 4.13.0
    gatsby-plugin-offline: ^5.13.0 => 5.13.0
    gatsby-plugin-react-helmet: ^5.13.0 => 5.13.0
    gatsby-plugin-sharp: ^4.13.0 => 4.13.0
    gatsby-source-filesystem: ^4.13.0 => 4.13.0
    gatsby-transformer-sharp: ^4.13.0 => 4.13.0
  npmGlobalPackages:
    gatsby-cli: 4.13.0

Config Flags

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:10
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
bre7commented, May 11, 2022

Same as https://github.com/parcel-bundler/parcel/issues/8005 ?

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

5reactions
LekoArtscommented, May 9, 2022

Can you try using Node.js v16? I’m pretty sure it’s this issue: https://github.com/mozilla/source-map/issues/454

We’ll need to see what we do with this upstream dependency

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build error You must provide the URL of lib/mappings.wasm
@parcel/optimizer-terser: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': .
Read more >
Gatsby build error (webpack related maybe) - Stack Overflow
I made a site with gatsby (npm init ...
Read more >
you must provide the url of lib/mappings.wasm by calling ...
Build error You must provide the URL of lib/mappings.wasm · Issue . ... lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': .
Read more >
Source-map NPM - npm.io
You must inform it by calling initialize before constructing any SourceMapConsumer s. The options object has the following properties: "lib/mappings.wasm" ...
Read more >
webpack/webpack - Gitter
SourceMapConsumer.initialize({ "lib/mappings.wasm": ... the javascript properly and when we inspect the span in browser, we can see the css loaded properly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found