PS D:HTML, CSS and JSThree JS> npm start
start
parcel index.html
Server running at http://localhost:1234
???? Build failed.
@parcel/core: Failed to resolve ‘three/addons/capabilities/WebGL.js’ from ‘./main.js’
1 | import * as THREE from 'three';
2 | import {WebGL} from ‘three/addons/capabilities/WebGL.js’;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 |
4 | if ( WebGL.isWebGLAvailable() ) {
@parcel/resolver-default: Cannot load file ‘./addons/capabilities/WebGL.js’ from module ‘three’
These three commands I have used to setup my Three JS Project for the first time.your text
npm install –save three
npm install –save-dev parcel
npm install three-stdlib
I expect that anybody who have well experience of three js, WebGL, node, npm and npx he/she will provide better solution for it. I have searched on Chat GPT as well as on Stackoverflow but I am still in the problem.
Amit Kumar Jha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.