Error saying typescript not installed (but it is)

Hi, I’m using Next on Netlify to deploy a website but getting the following error

It looks like you’re trying to use TypeScript but do not have the required package(s) installed.

3:16:54 PM: Please install typescript by running:

3:16:54 PM: yarn add --dev typescript

3:16:54 PM: If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).

But I do have it installed

"typescript": "^4.3.2",

@types/node”: “^15.6.1”,

Hi there, @slightly-askew :wave:

Welcome to the Netlify Forums! Sorry to hear you are encountering an unexpected behaviour. We will need a bit more information to dig in here. Can you please share your site name and your repo?

Hey @hillary :wave:

Thank you!
Repo is
Site name is eloquent-haibt-d9ac20
Latest deploy is at

I did manage to deploy it with netlify-cli but not CI :slight_smile:

Hi @slightly-askew

I notice you have "typescript": "^4.3.2", listed under devDependencies in your package.json but not listed under dependencies.

Thanks for the suggestion, coelmay!

The instruction in the error message does include the --dev flag, so a devDependency should work fine? I’m not sure that there would be any difference in this context?

devDependencies are those required as part of the development workflow, as opposed to dependencies which are required when running your code (in-depth explanations Types of dependencies | Yarn )

Hi @slightly-askew

I see you’ve also raised a helpdesk ticket regarding the issue. We’d be following up there.