Skip to content

Fix node modules import errors in VS Code

FULL-STACK WEB DEVELOPMENT BOOTCAMP

2024 COHORT SIGNUPS END TOMORROW

Got this error in VS Code?

Cannot find module 'fs' or its corresponding type declarations.ts(2307)

You need to include the definition file for node in your project.

Run this:

npm install --save-dev @types/node

and reload the VS Code window

  • Learn modern web development in my BOOTCAMP (SIGNUP END TOMORROW FEB 20, 2024)
  • THE VALLEY OF CODE (+ PRO), your web development manual
  • I wrote 15+ coding BOOKS, all available in THE VALLEY OF CODE PRO
  • Indie solopreneur internet business masterclass SOLO LAB (summer 2024)