-
Notifications
You must be signed in to change notification settings - Fork 10
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: require() of ES Module, NextJS #18
Comments
I don't have the bandwidth right now but if anyone has time to look into this and raise a PR I'd be happy to review and merge. Might be something @g-plane could provide some insight to. The upstream issue for the framework bindings bs-community/skinview3d#107 |
ok |
This seems like a working solution from my minimal testing. Followed this thread vercel/next.js#25454 |
Gonna close this out and if the issue still persists please raise another issue. |
yes, this works for me too 👍! but i have a question. Can you use controls with JS (not TypeScript)? im getting "ReferenceError: skinview3d is not defined" when using after importing skinview3d im getting "TypeError: skinview3d.createOrbitControls is not a function" |
@andreihalt I've updated the codesandbox to show how. You need to install https://codesandbox.io/s/react-skinview3d-next-esm-7n2eh1?file=/pages/index.js |
Getting:
Error: require() of ES Module E:\skinview3d\myapp\node_modules\skinview3d\libs\skinview3d.js from E:\skinview3d\myapp\node_modules\react-skinview3d\dist\index.js not supported.
Instead change the require of skinview3d.js in E:\skinview3d\myapp\node_modules\react-skinview3d\dist\index.js to a dynamic import() which is available in all CommonJS modules.
With react-skinview3d whilst using NextJS
Sandbox:
https://codesandbox.io/s/determined-varahamihira-62ms17?file=/pages/index.js
The text was updated successfully, but these errors were encountered: