I’m trying to transfer the lesson code to the computer. Gives an error to import. What should I to replace it with? Thank you.
You would need to share a bit more information - that error doesn’t seem like something that should happen when running a local server.
- Are you using node / npm to run the server?
- What dev server are you using?
- How are you running your code?
- Npm
- https://parceljs.org/
- parcel index.html
you can use codesandbox. don’t even need a local setup in that case: https://codesandbox.io/s/reurope-threejs-basic-kiow9 this runs a full npm build env in your browser.
if you want it locally, just click the “export to zip” button and it downloads a ready made production setup (i think based on parcel). run npm install on it, npm start, and you’re good.
i use csb if i want to quickly setup something running.
2 Likes