Skip to content

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

@bre7

Description

@bre7

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions