File '@strapi/typescript-utils/tsconfigs/server' not found. Error on installing strapi in linux

1.3k Views Asked by At

tsconfig.json:2:14 - error TS6053: File '@strapi/typescript-utils/tsconfigs/server' not found.

2 "extends": "@strapi/typescript-utils/tsconfigs/server", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error(s).

When I tried to install Strapi using npx create-strapi-app@latest my-project command, I got the below error

Error while installing dependencies: Keep trying! Oh, it seems that you encountered errors while installing dependencies in your project. Don't give up, your project was created correctly. Fix the issues mentioned in the installation errors and try to run the following command

But there was no error logs and when I tried yarn install && yarn develop, getting the typescript error. The node version in my system is v18.4

I have installed Strapi version 4 earlier and it was successful but currently while trying to install using the same command getting this error.

6

There are 6 best solutions below

0
bastipls On

In my case i have the same issue, to fix use npm install instead of yarn install

node v18.7.0
yarn v3.6.1
strapi v4.12.1
0
Heartbit On

As you are using Yarn 2+ the default nodeLinker: pnp is applied to your local module setting so you can change the config to nodeLinker: node_modules inside .yarnrc.yml that you should create inside your project directory if not exists. and after that, you should run yarn install again.

0
jps On

The problem is caused because yarn is trying to use pnp, you can "resolve" the issue by setting it to use the legacy node modules version like by adding the following to the root of your package.json

"packageManager": "[email protected]"

More info available in the node docs.

0
Thremulant On

I'm using npm and I still got the issue. I solve this part by installing this package:

npm i @strapi/typescript-utils
0
Remi Kristelijn On

In my case I was upgrading strapi, specifically @strapi/[email protected] to 4.15.4

My fix was updating tsconfig.json

  • changed "extends": "@strapi/typescript-utils/tsconfigs/server",
  • to "extends": "./node_modules/@strapi/typescript-utils/tsconfigs/server",
0
Ali On

If you are using pnpm try to install the package manually like this:

pnpm add @strapi/typescript-utils