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

Runtime error regarding undefined imports on Buttplug versions 1.0.15 - 1.0.17 when using Webpack 5 #95

Open
amydevs opened this issue Oct 24, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@amydevs
Copy link

amydevs commented Oct 24, 2022

Describe the bug
All the imports from "buttplug" are undefined when loading the library with Webpack 5 without transpiling dependencies. An example of the error message shown:
TypeError: buttplug__WEBPACK_IMPORTED_MODULE_4__.buttplugInit is not a function
Upon console.log'ing any import from "buttplug", it is undefined.
This behavior has been exhibited in freshly-created Vue 3 / and Next.js projects.

Expected behavior
Importing from "buttplug" should be defined.

Actual behavior
Error: TypeError: buttplug__WEBPACK_IMPORTED_MODULE_4__.buttplugInit is not a function
None of the imports are defined.

Additional context
This issue happens from "buttplug" version 1.0.15 onwards.
The same behaviour happens also when importing through these methods:

const { buttplugInit } = await import('buttplug');
import * as Buttplug from "buttplug";

An example of this happening can be seen here: https://github.com/jy1263/buzzy-vue/tree/latest-buttplug
It's interesting that window.Buttplug is defined with everything in it though.

@amydevs amydevs added the bug Something isn't working label Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants