I made a site with gatsby (npm init gatsby) and added some components and was working fine then:
I run npm run develop (after running it before fine) and get this:
failed Building development bundle - 13.532s
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
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
What causes this error and how can I fix this? I'm baffled. Tried with fresh new site and does the same thing.
I upgraded to latest version of node so maybe this has something to do with it. Can anyone help?
CodePudding user response:
try do delete the .cache file and then run npm run develop
CodePudding user response:
I can confirm that downgrading to node 16 fixes the issue.