I currently have a Next.js app that is written in Javascript, but I am looking to transition to writing new code in Typescript.
To add Typescript to my project, I tried creating a tsconfig.json
file at the project root and then ran
npm install --save-dev typescript @types/react @types/node
.
However, when I attempt to run npm run dev
, it throws an error:
error - ./pages/_app.js:6:0
Module not found: Can't resolve 'src/assets/styles/index.scss'
This seems to be affecting the ability to import modules properly throughout the project.
What steps do I need to take in order to ensure that both Javascript and Typescript can work seamlessly together?