Sveltestrap Tooltip generates ReferenceError: process not defined (in createPopper.js)

Viewed 1069

I'm trying to use Tooltip with Svelte and SvelteStrap and need a hand :)

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)



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"
  }

What shall I do to make this work? :)

1 Answers

It seems there was an issue in Sveltestrap itself. Reported and solved here:

GitHub issue

Now this works as intended.

Related