strapi / sdk-plugin

CLI toolkit for developing a Strapi plugin
Other
4 stars 4 forks source link

[bug]: failed to resolve Error while building a plugin #24

Closed sanhup closed 1 month ago

sanhup commented 2 months ago

What version of @strapi/blocks-react-renderer are you using?

Node.js version: v20.15.0 yarn version: 1.22.22 Strapi version: 4.24.0 Database: sqlite Operating system: Windows Is your project Javascript or Typescript: ts

What's Wrong?

I initialized a new plugin outside the strapi folder with the npx @strapi/sdk-plugin@latest init my-plugin command.

In the options I selected both a admin and server plugin and also typescript. Then I just wanted to build this default plugin without any modifications using yarn build

I get the following error: [vite:esbuild] failed to resolve "extends":"@strapi/typescript-utils/tsconfigs/admin" in C:\Development\strapi5\github-projects\admin\tsconfig.json

I lookend in node_modules @strapi/typescript-utils/tsconfigs. There is a server.json, but there is no admin.json.

Just to try I copied the server.json and renamed to admin.json in node_modules. Now build is not failing, but of course this is not a good solution.

To Reproduce

npx @strapi/sdk-plugin@latest init my-plugin
yarn install
yarn build

Expected Behaviour

No error, correctly installing and building.

innerdvations commented 1 month ago

Fixed with the combination of a fix here and Strapi rc.7