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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel issues on npm run build. #1334

Closed
aminecmi opened this issue May 14, 2022 · 4 comments
Closed

Parcel issues on npm run build. #1334

aminecmi opened this issue May 14, 2022 · 4 comments
Labels

Comments

@aminecmi
Copy link
Contributor

Hello,

I'm trying to install selfoss from scratch. I'm up-to-date with the master branch, and I keep having an issue with parcel.

Here is the error message I keep having.

> @ build /var/www/amine/selfoss/assets
> parcel build index.html opml.html hashpassword.html --dist-dir ../public/ --public-url ./

Error: Unable to deserialize cloned data due to invalid or unsupported version.
    at deserialize (v8.js:343:7)
    at deserialize (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/serializer.js:249:48)
    at loadRequestGraph (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/RequestTracker.js:854:52)
    at async Function.init (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/RequestTracker.js:821:17)
    at async Parcel._init (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/Parcel.js:256:28)
    at async Parcel.run (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/Parcel.js:273:7)
    at async run (/var/www/amine/selfoss/assets/node_modules/parcel/lib/cli.js:374:7)
npm ERR! code ELIFECYCLE

I tried downgrading my npm version from 18 to 16, and then 14, but that didn't work.

Any idea on how to solve this ?

@aminecmi
Copy link
Contributor Author

On the latest version of npm, the build fails a little later.

🚨 Build failed.

@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 (/var/www/amine/selfoss/assets/node_modules/terser/node_modules/source-map/lib/read-wasm.js:8:13)
  at wasm (/var/www/amine/selfoss/assets/node_modules/terser/node_modules/source-map/lib/wasm.js:25:16)
  at /var/www/amine/selfoss/assets/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 (/var/www/amine/selfoss/assets/node_modules/terser/dist/bundle.min.js:19362:20)
  at async minify (/var/www/amine/selfoss/assets/node_modules/terser/dist/bundle.min.js:27714:41)
  at async Object.optimize (/var/www/amine/selfoss/assets/node_modules/@parcel/optimizer-terser/lib/TerserOptimizer.js:131:16)
  at async PackagerRunner.optimize (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/PackagerRunner.js:364:20)
  at async PackagerRunner.getBundleResult (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/PackagerRunner.js:255:15)
  at async PackagerRunner.getBundleInfo (/var/www/amine/selfoss/assets/node_modules/@parcel/core/lib/PackagerRunner.js:239:9)

@jtojnar
Copy link
Member

jtojnar commented May 14, 2022

I have seen some serialization issues when there was assets/.parcel-cache from a different Node version (probably a bug in Parcel). Try deleting the directory.

The latter is caused by source-map package not being compatible with latest Node.js, it is possible to work around it with parcel-bundler/parcel#8005 (comment).

@aminecmi
Copy link
Contributor Author

Thanks for this.

Everything works now !

@jtojnar
Copy link
Member

jtojnar commented May 15, 2022

143eef5 bumps the terser that bumps the source-map so hopefully that fixes the second issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants