-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Missing relative path to three in examples #21853
Comments
Javascript newbie here. I spent a lot of time confused by this, so maybe it will help others to document my current understanding. Per #22008 (comment), the answer seems to be "loading modules in web apps from node_modules is not supported anymore." Looking at the migration guide, it is suggested to use https://cdn.skypack.dev to load modules. For example, this seems to work:
As far as I can tell, there is no way to get Without a bundler this complains:
As the original commenter says, the problem is that |
Please use the forum is you need help regarding your development process and module usage. |
when instaling r128 with npm the files in examples/jsm/ seem to import like this:
import {
....
} from 'three';
instead of a relative path (../../../build/three.modules.js) (as it is done in r127)
Hence Browsers complain, that three is not a relative path and do not load anything.
However, I cannot find the problem in the current code base on github - which uses the relative path. I checked out the master-branch, and it also uses the relative path.
However, if I use npm install three, the relative path is replace by "three" in files which were moved to ES6 class syntax.
My specific case was with "examples/jsm/curves/NURBSCurve.js", but the problem seems to permate many more files.
Platform:
The text was updated successfully, but these errors were encountered: