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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Uncaught (in promise): process is not defined message #25

Closed
shinokada opened this issue Sep 1, 2022 · 1 comment
Closed

Error: Uncaught (in promise): process is not defined message #25

shinokada opened this issue Sep 1, 2022 · 1 comment

Comments

@shinokada
Copy link

I just copy and pasted the example in README and this is the REPL link.

As you see in the console, it returns an error and the example tooltip does not hide after on:mouseleave.

image

@shinokada shinokada changed the title Error: Uncaught (in promise): process is not defined message: "Uncaught (in promise): process is not defined" stack: "ReferenceError: process is not defined…" Error: Uncaught (in promise): process is not defined message Sep 1, 2022
@bryanmylee
Copy link
Owner

bryanmylee commented Sep 1, 2022

Hi @shinokada, thanks for the report. This is a duplicate of #7 and is unfortunately an issue with PopperJS itself.

PopperJS depends on the process global variable, but the Svelte REPL does not define process.

There should be no issues with SvelteKit or Vite as they both handle process properly.

If you're using Rollup, you can resolve this by using rollup-plugin-replace:

npm i -D @rollup/plugin-replace

Add the plugin to your Rollup config:

plugins: [
  replace({ 'process.env.NODE_ENV': JSON.stringify( 'production' ) }),
  // ...other plugins
]

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

2 participants