question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bundler fails to run when trying to import `acorn` via `terser`

See original GitHub issue

Bundler is failing to run with a SyntaxError when trying to import acorn via terser.

Possibly related to https://github.com/terser/terser/issues/1002

deno run --unstable --allow-all -r https://deno.land/x/bundler/spa_server_cli.ts

...

Check https://deno.land/x/bundler/spa_server_cli.ts
error: Uncaught SyntaxError: The requested module '/v51/acorn@8.5.0/deno/acorn.js' does not provide an export named 'default'
    at <anonymous> (https://cdn.esm.sh/v51/terser@5.7.1/deno/terser.js:2:172)
deno --version
deno 1.14.0 (release, aarch64-apple-darwin)
v8 9.4.146.15
typescript 4.4.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ijecommented, Sep 18, 2021

@rotu can you pls try again?

0reactions
rotucommented, Sep 22, 2021

Thank you, @ije! I can verify this is fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

acorn should be in dependencies (breaking Yarn PnP builds)
terser is currently breaking builds using Yarn PnP as a package manager. It appears that the issue would be acorn being incorrectly listed ......
Read more >
API Reference - Terser
Assuming installation via NPM, you can load Terser in your application like this: const { minify } = require("terser");. Or, import { minify...
Read more >
Debugging Story: Build failed, error from Terser - Tan Li Hau
It all started with an error message during the build: 'ERROR in bundle.xxx.js from Terser'.
Read more >
Most popular mistake to ruin Webpack bundle optimization
You probably saw this coming - terser can remove your unused export -s only if webpack scoped them in a way that unused...
Read more >
Unexpected token (Note that you need plugins to import files ...
You don't want that, so to avoid it upon building each package i am parsing ... I had the same error message, also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found