ThreeJS - three ways
It can be hard to know how to get ThreeJS examples with imports working sometimes.
The ThreeJS docs work based on the entire ThreeJS repo, not what you want in production. Parcel expects you to work in a Node environment. Rollup expects you to work in a Node environment, but deploy in a HTML environment. Vanilla JS expects a completely html environment.
This guide, while not perfect, should get you at least working in any of those setups.