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's profile photo
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?

  1. Delete your project's node_modules folder

  2. Delete your package-lock.json file

  3. Run npm install with your project open in your terminal

  4. Run npm run dev

  5. Visit site at localhost:3000

Want to participate?

Create a free Chris Courses account to begin

Providing the lift to launch your development career

© 2026 Chris Courses. All rights reserved.