我用 gatsby (npm init gatsby) 创建了一个网站,并添加了一些组件,然后工作正常:
我运行 npm rundevelop (在正常运行之后)并得到:
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
Run Code Online (Sandbox Code Playgroud)
是什么原因导致此错误以及如何修复此错误?我很困惑。尝试了新的网站并做了同样的事情。
我升级到了最新版本的节点,所以也许这与它有关。有人可以帮忙吗?