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.

BuildError: squirrelly@7.8.0 fails to build

See original GitHub issue

squirrelly

Entire (stringified) error that I see in my browser console

main.bundle.js from Terser Export statement may only appear at top level [main.bundle.js:11,4290]
"{"error":{"code":"BuildError","message":"Failed to build this package.","details":{"name":"BuildError","originalError":["main.bundle.js from Terser\nExport statement may only appear at top level [main.bundle.js:11,4290]"]}}}"

Notes

I just refactored my library, squirrelly, to support ES Modules. All previous versions compile correctly. My library’s ES Module dist can be found here: https://unpkg.com/squirrelly@7.8.0/dist/es/squirrelly.dev.js

Testing version 7.8.0, however, seems to indicate that it works fine…

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pastelskycommented, Dec 29, 2019

You could still minify your ES builds and distribute them if they were a part of dist in your package, but not exposed through the module declaration in package.json?

0reactions
nebrelbugcommented, Dec 28, 2019

@pastelsky I’m debating creating three builds: a CJS build (main), an ES build (module), and a UMD build (browser). I’d only minify the UMD build. I think this should solve the problem.

Can you think of any potential problems with this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flask error: werkzeug.routing.BuildError - Stack Overflow
I modify the login of flaskr sample app, the first line get error. But www.html is in the ...
Read more >
Build error for Python 3.7 on two different projects
I updated the readme of two of my python projects on Github and the triggered buildings from Travis CI were both failed under...
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