-
Notifications
You must be signed in to change notification settings - Fork 922
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
🐛 BUG: #3867
Comments
I'll leave more info. Three.js is using a valid node "exports": {
".": {
"import": "./build/three.module.js",
"require": "./build/three.cjs"
},
"./examples/fonts/*": "./examples/fonts/*",
"./examples/jsm/*": "./examples/jsm/*",
"./src/*": "./src/*"
}, in plain node.js, this import works correctly: import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; while on snowpack, the error reported above occurs. |
I am also encountering this issue |
I'm having the same issue |
For a temporary fix, you can go into your local |
Thanks @jhsul that worked for me! I also had to add the '.js' extension to my import: |
Quick checklist
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the bug
I'm trying to build an application with Three.js, importing a class from their examples folder. Although they have that exported in their package.json, I get an eror as decribed on the snowpack website that it isn't exported:
Package "three" exists but package.json "exports" does not include entry for "./examples/jsm/webxr/ARButton.js".
.Steps to reproduce
Link to minimal reproducible example (optional)
https://github.com/Bassadin/Three.LS
The text was updated successfully, but these errors were encountered: