XaiJu
Yuri Artiukh
Yuri Artiukh

patreon


#8 stream code

Comments

Thanks Yuri! But no i get following error, do you have an idea? 🚨 Build failed. @parcel/core: Failed to resolve 'three/examples/jsm/controls/OrbitControls.js' from './js/app.js' /Users/mb/Desktop/revo/js/app.js:2:31 1 | import * as THREE from "three"; > 2 | import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 | // import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'; 4 |

Mario Boro

hi! just edit html to have __script type="module"__ attribute, parcel 2 requires that.

Yuri Artiukh

Hello Yuri, i get following errors while installing it with npx parcel index.html. Please can you help? Server running at http://localhost:1234 🚨 Build failed. @parcel/transformer-js: Browser scripts cannot have imports or exports. /Users/mb/Desktop/revo/js/app.js:1:1 > 1 | import * as THREE from "three"; > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; 3 | // import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'; /Users/mb/Desktop/revo/index.html:14:2 13 | > 14 | > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The environment was originally created here 15 | 16 | 💡 Add the type="module" attribute to the tag. 📝 Learn more: https://parceljs.org/languages/javascript/#classic-scripts

Mario Boro


More Creators