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

Broken in Node.js v18. #454

Closed
Qard opened this issue Apr 23, 2022 · 3 comments
Closed

Broken in Node.js v18. #454

Qard opened this issue Apr 23, 2022 · 3 comments

Comments

@Qard
Copy link

Qard commented Apr 23, 2022

Apparently this module environment detects the browser by looking for the "fetch" function but fetch is now available in Node.js v18. It no longer works in Node.js because it thinks it's a browser. 馃槓

@maxmilton
Copy link

maxmilton commented Apr 24, 2022

Reading through terser/terser#1164 it seems Node.js detection was already fixed years ago back in 2018 but never released. Looks like issue #452 is about publishing a new release.

@jacobq
Copy link

jacobq commented May 17, 2022

Duplicate of #432 / #452

@eemeli
Copy link
Member

eemeli commented Jun 6, 2022

This is fixed in source-map@0.7.4.

@eemeli eemeli closed this as completed Jun 6, 2022
oetiker added a commit to qooxdoo/qooxdoo that referenced this issue Jun 27, 2022
It seems only source-map 0.7.4 works with node v18: mozilla/source-map#454
hkollmann pushed a commit to qooxdoo/qooxdoo that referenced this issue Jun 28, 2022
It seems only source-map 0.7.4 works with node v18: mozilla/source-map#454

Thanks @oetiker !
heypiotr added a commit to heypiotr/ncc that referenced this issue Nov 8, 2022
Fixes minification failing on Node 18 with:

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

mozilla/source-map#454
styfle pushed a commit to vercel/ncc that referenced this issue Nov 27, 2022
Fixes minification failing on Node 18 with:

> You must provide the URL of lib/mappings.wasm by calling
SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using
SourceMapConsumer

mozilla/source-map#454

There's also an open dependabot PR to bump the Terser version itself, I
confirmed that also fixes the issue:
[chore(deps-dev): bump terser from 5.10.0 to
5.15.1](#988)
SeanZellmer added a commit to SeanZellmer/tsup that referenced this issue Feb 16, 2023
the `source-map` package is broken in Node.js 18, it was fixed but the beta version was never released

see mozilla/source-map#454
matheusccastroo added a commit to matheusccastroo/meteor that referenced this issue Jun 2, 2023
Bump the `source-map` version to fix the issue: mozilla/source-map#454.

We are not updating the NPM version because there is an breaking change with the `npm config set python` which we use with `node-gyp`.
diracdeltas added a commit to brave/brave-core that referenced this issue Oct 17, 2023
Workaround for mozilla/source-map#454 since we
seem to be hitting this error, causing jest reporting to fail.
diracdeltas added a commit to brave/brave-core that referenced this issue Oct 17, 2023
Workaround for mozilla/source-map#454 since we
seem to be hitting this error, causing jest reporting to fail.
diracdeltas added a commit to brave/brave-core that referenced this issue Oct 17, 2023
Workaround for mozilla/source-map#454 since we
seem to be hitting this error, causing jest reporting to fail.

cross-env is needed to make env variable setting work on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants