Three.js module installed from npm does not have examples/jsm

Greetings all,

I installed three module from npm and was trying to import an “Importable Examples” when I noticed that the directory ’ three/examples/jsm’ does not exist. the documentation " Import via modules" says that the import path is " three/examples/jsm/controls/OrbitControls.js" but I found the files to be in “js” directory not “jsm”.

I just wanted to point out if the documentation is outdated.
if not then could it be that npm didnt install correctly?



Did you check in node_modules/three directory? Does it have a build/ folder and not an example/ folder?

I checked it, and it had both but ‘examples/’ was missing ‘jsm/’ directory.

To make sure, I uninstalled and installed the npm module again. this time it installed it with the ‘jsm’ dir. it seems the issue was the npm installation after all.

thank you for your reply.

1 Like

it’s possible you had an old version of three, I’m never sure what happens if I manually edit package.json,

1 Like