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.

[Bug]: `exports is not defined` with out-of-the-box Svelte project

See original GitHub issue

Contact Details

nguyen.long.908132@gmail.com

What happened?

Following the readme for svelte-particles, loading the site results in an exports is not defined error, even with a fresh project skeleton. Rollup is also complaining about circular dependencies, so it might be the source of the problem. Using https://github.com/sveltejs/template/commit/8d350b693fb4bd8ecf340841eac22a1cb85d7986.

Version

1.40.1

Which library are you using?

Svelte (svelte-particles)

tsParticles Configuration

none needed, it throws immediately on loading the module

What browsers are you seeing the problem on?

Microsoft Edge

Relevant log output

(!) Circular dependencies
node_modules\tsparticles\Core\index.js -> node_modules\tsparticles\Core\Canvas.js -> node_modules\tsparticles\Utils\index.js -> node_modules\tsparticles\Utils\CanvasUtils.js -> node_modules\tsparticles\Utils\ColorUtils.js -> node_modules\tsparticles\Utils\NumberUtils.js -> node_modules\tsparticles\Core\index.js
node_modules\tsparticles\Core\index.js -> node_modules\tsparticles\Core\Canvas.js -> node_modules\tsparticles\Utils\index.js -> node_modules\tsparticles\Utils\CanvasUtils.js -> node_modules\tsparticles\Utils\ColorUtils.js -> node_modules\tsparticles\Utils\NumberUtils.js -> G:\Code\tsParticles test\node_modules\tsparticles\Core\index.js?commonjs-proxy -> node_modules\tsparticles\Core\index.js
node_modules\tsparticles\Core\index.js -> node_modules\tsparticles\Core\Canvas.js -> node_modules\tsparticles\Utils\index.js -> node_modules\tsparticles\Utils\CanvasUtils.js -> node_modules\tsparticles\Utils\ColorUtils.js -> node_modules\tsparticles\Core\index.js
node_modules\tsparticles\Core\index.js -> node_modules\tsparticles\Core\Canvas.js -> node_modules\tsparticles\Utils\index.js -> node_modules\tsparticles\Utils\CanvasUtils.js -> node_modules\tsparticles\Utils\ColorUtils.js -> node_modules\tsparticles\Utils\Utils.js -> node_modules\tsparticles\Core\index.js

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
matteobrunicommented, Feb 7, 2022

It’s working, also when using the package without yarn link, I’ve created the package and installed using the file path to the zipped file, and the svelte demo created with these instructions is working. I’m going to release an update soon so we can see if this issue is solved.

1reaction
matteobrunicommented, Feb 7, 2022

I’m trying a build without it, let’s see if everything work without it

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError: exports is not defined · Issue #712 · sveltejs/kit
Describe the bug. When working with SvelteKit and attempting to import the mediasoup-client library into one of my main components as such: ·...
Read more >
Svelte: Uncaught ReferenceError: exports is not defined
I am trying to use dgraph-js-http in a Svelte application. Error. The initial error I was facing was: Uncaught ReferenceError: buffer is not ......
Read more >
Docs • Svelte
$$restProps contains only the props which are not declared with export . It can be used to pass down other unknown attributes to...
Read more >
TypeScript support in Svelte - Learn web development
In this section we'll show you how to set up a Svelte project with TypeScript support to give it a try. Why TypeScript?...
Read more >
rollup.js
This is useful for code-splitting applications and using modules on-the-fly. Exporting. Named exports. Export a value that has been previously declared: const ...
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