Back to Forum
I'm have an error in the three.js couse code
gjhammt posted 4 years ago
Hi Chris
When I try to install dat.gui or gsap I got this error : Uncaught TypeError: Failed to resolve module specifier "dat.gui"/ "gsap". Relative references must start with either "/", "./", or "../".
can you please help me to resolve the issue
Thanks
chris posted 4 years ago
Hi Gurpreet, could you try importing dat.gui and gsap with:
import * as dat from "dat.gui";
import gsap from 'gsap';If that's still giving you issue, could you try the following?
Delete your project's node_modules folder
Delete your package-lock.json file
Run npm install with your project open in your terminal
Run npm run dev
Visit site at localhost:3000
Want to participate?
Create a free Chris Courses account to begin