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

Tooltip: Reference error in createPopper.js #250

Closed
PrzemekGalek opened this issue Apr 15, 2021 · 7 comments
Closed

Tooltip: Reference error in createPopper.js #250

PrzemekGalek opened this issue Apr 15, 2021 · 7 comments

Comments

@PrzemekGalek
Copy link

Disclaimer: this issue report definitely needs to be checked, as I'm not very exprienced and I assume there is quite a big chance I did something wrong and there is no issue at all. If thats the case, I apologize in advance :)

Minimal working example is:

<script>
    import {
        Button,
        Tooltip,
    } from 'sveltestrap';
</script>
<Button id="btntest">test</Button>
<Tooltip target="btntest" placement="top" />

After hovering the button, it shows a tooltip (not exactly properly aligned) and immediatelly throws an error:

Uncaught (in promise) ReferenceError: process is not defined
    at Object.setOptions (createPopper.js:80)
    at createPopper (createPopper.js:214)
    at Object.$$self.$$.update (Tooltip.svelte:29)
    at update (index.mjs:760)
    at flush (index.mjs:732)

Minimal build just to check, perhaps I forgot something :)

Package.json:
"devDependencies": {
    "@rollup/plugin-commonjs": "^17.0.0",
    "@rollup/plugin-node-resolve": "^11.0.0",
    "rollup": "^2.3.4",
    "rollup-plugin-css-only": "^3.1.0",
    "rollup-plugin-livereload": "^2.0.0",
    "rollup-plugin-svelte": "^7.0.0",
    "rollup-plugin-terser": "^7.0.0",
    "svelte": "^3.37.0"
  },
  "dependencies": {
    "sirv-cli": "^1.0.0",
    "sveltestrap": "^3.14.0"
  }
@bestguy
Copy link
Owner

bestguy commented Apr 15, 2021

Thanks @PrzemekGalek , hmm that is odd, I don't see here:
https://sveltestrap.js.org/?path=/story/components--tooltip

But I do see in repl:
https://svelte.dev/repl/d9ae4209abb747c1b232680320240ea5?version=3.37.0

It might be due to svelte or popper change using latest versions, let me see what's up

@bestguy
Copy link
Owner

bestguy commented Apr 17, 2021

I think this is the root issue: floating-ui/floating-ui#933

I'll look at what import we can change that supports the built and src versions.

@bestguy
Copy link
Owner

bestguy commented Apr 17, 2021

We have a prerelease version if you'd like to try and confirm it works for you @PrzemekGalek :
npm install sveltestrap@3.14.1-0

@PrzemekGalek
Copy link
Author

@bestguy Yup, that works like a charm, thanks a lot!

@bestguy
Copy link
Owner

bestguy commented Apr 17, 2021

Great! I'll do an official release of 3.14.1 this weekend

@bestguy
Copy link
Owner

bestguy commented Apr 18, 2021

Hi @PrzemekGalek , this should be corrected in v3.14.1.

Thanks for finding the issue.

@PrzemekGalek
Copy link
Author

Great! Thanks for quick solution!

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