You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. 😐
Reacted by devin ivy, Max Milton, Benjamin Ryan, Maggie Nolan Edmonds, Amarin (Um) Phaosawasdi, Asher Foa, Boris Petrov, Chris Cowan, Alec Larson, EtherDream and 5 more
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.
Activity
maxmilton commentedon 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.
[npm]: Manually add terser 5.13.0 dependency
fix: update `source-map` to 0.8.0-beta.0, closes #623
jacobq commentedon May 17, 2022
Duplicate of #432 / #452
eemeli commentedon Jun 6, 2022
This is fixed in
source-map@0.7.4.Make source-map compatibe with node v18
Make source-map compatibe with node v18 (#10418)
Update source-map used by Terser to 0.7.4
fix: node 18 by update source-map used by Terser to 0.7.4 (#999)
fix: update `source-map` to 0.8.0-beta.0, closes #623
Update Node version to `18.16.0` LTS