Set up a development server

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.

  1. Are you using node / npm to run the server?
  2. What dev server are you using?
  3. How are you running your code?
  1. Npm
  2. https://parceljs.org/
  3. 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