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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error You must provide the URL of lib/mappings.wasm #8005

Closed
bre7 opened this issue Apr 25, 2022 · 11 comments 路 Fixed by tweag/webauthn#179
Closed

Build error You must provide the URL of lib/mappings.wasm #8005

bre7 opened this issue Apr 25, 2022 · 11 comments 路 Fixed by tweag/webauthn#179
Labels
鉁栵笍 Non-Parcel bug Bugs related to dependencies or plugins

Comments

@bre7
Copy link
Contributor

bre7 commented Apr 25, 2022

馃悰 bug report

Build was working fine days ago (before env was updated to Node 18).

馃帥 Configuration (.babelrc, package.json, cli command)

parcel build --target=target2 dist2/perm.html --no-scope-hoist

.terserrc

{
  "compress": {
    "drop_console": true
  }
}

馃 Expected Behavior

Build should be successful.

馃槸 Current Behavior

Error message is displayed on console:

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

  Error: You must provide the URL of lib/mappings.wasm by calling
  SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using
  SourceMapConsumer
  at readWasm
  (/home/circleci/project/web/node_modules/terser/node_modules/source-map/lib/read-wasm.js:8:13)
  at wasm
  (/home/circleci/project/web/node_modules/terser/node_modules/source-map/lib/wasm.js:25:16)
  at
  /home/circleci/project/web/node_modules/terser/node_modules/source-map/lib/source-map-consumer.js:264:14
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async SourceMap
  (/home/circleci/project/web/node_modules/terser/dist/bundle.min.js:19385:20)
  at async minify
  (/home/circleci/project/web/node_modules/terser/dist/bundle.min.js:27785:41)
  at async Object.optimize
  (/home/circleci/project/web/node_modules/@parcel/optimizer-terser/lib/TerserOptimizer.js:131:16)
  at async PackagerRunner.optimize
  (/home/circleci/project/web/node_modules/@parcel/core/lib/PackagerRunner.js:364:20)
  at async PackagerRunner.getBundleResult
  (/home/circleci/project/web/node_modules/@parcel/core/lib/PackagerRunner.js:255:15)
  at async PackagerRunner.getBundleInfo
  (/home/circleci/project/web/node_modules/@parcel/core/lib/PackagerRunner.js:239:9)

馃拋 Possible Solution

Workaround was to rollback to Node 17 (17.9.0)

馃敠 Context

馃捇 Code Sample

馃實 Your Environment

CircleCI with docker image cimg/node:18.0

Software Version(s)
Parcel 2.4.0
Node 18.0.0
npm/Yarn 1.22.18
Operating System Ubuntu 20.04.4 LTS
@devongovett
Copy link
Member

Based on the stack trace, looks like a problem with terser?

@jtojnar
Copy link
Contributor

jtojnar commented Apr 26, 2022

A bug in source-map: mozilla/source-map#432
Fixed but not in any stable version: mozilla/source-map#452
Terser bumped the dependency to beta but it have not had a release yet either: terser/terser#1164

@mischnic mischnic added the 鉁栵笍 Non-Parcel bug Bugs related to dependencies or plugins label Apr 26, 2022
@Mirokko
Copy link

Mirokko commented May 6, 2022

It is already merged. https://github.com/terser/terser/blob/v5.13.1/package.json#L48

@benpigchu
Copy link

As another workaround, export NODE_OPTIONS=--no-experimental-fetch should work

@bre7
Copy link
Contributor Author

bre7 commented May 7, 2022

Thanks ! Closing since both a solution (update terser or force resolution) and a workaround were provided

@neoswf
Copy link

neoswf commented Jun 17, 2022

I have updated Parcel locally and all dependencies, and even though I had to apply @benpigchu solution to be able to build.

JohT added a commit to JohT/data-restructor-js that referenced this issue Jul 19, 2022
Andersbakken added a commit to Andersbakken/smipper that referenced this issue Aug 11, 2022
some wasm issue.

These people had the same problem apparently:

parcel-bundler/parcel#8005
cometkim added a commit to daangn/websites that referenced this issue Oct 21, 2022
See mozilla/source-map#452
See also parcel-bundler/parcel#8005

Co-authored-by: Minji Choi <eunoia2040@gmail.com>
@warifp
Copy link

warifp commented Mar 7, 2023

As another workaround, export NODE_OPTIONS=--no-experimental-fetch should work

Thank!

@abhijit-chikane
Copy link

it is still not working for me

@phoenixeliot
Copy link

Working for me after updating to parcel 2.9.1 from 2.3.2, make sure you've updated your version @abhijit-chikane

@abhijit-chikane
Copy link

for me it was due to some other reason but anyway thanks

@nikita-fuchs
Copy link

If it is an option for you, you can also jump back to node 16 real quick for a minute, 脿 la $ nvm use 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
鉁栵笍 Non-Parcel bug Bugs related to dependencies or plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.