Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strapi: Error when building from workspace root #176

Closed
certainlyakey opened this issue Nov 14, 2023 · 5 comments · Fixed by #178
Closed

Strapi: Error when building from workspace root #176

certainlyakey opened this issue Nov 14, 2023 · 5 comments · Fixed by #178

Comments

@certainlyakey
Copy link

Hi, thanks a lot for the great software!
I noticed that when i run npx nx run <package-name>:build in the workspace root, i get an error:

Package subpath './dist/commands/builders/admin' is not defined by "exports" in <workspace-root>/node_modules/@strapi/strapi/package.json

Here's a repro using the latest nx: https://github.com/certainlyakey/nx-extendstrapi-repro/. However, the same error (just with ./dist/commands/builders) appears for me even when downgrading to @nx-extend/strapi 6.1.8 and nx 16.

The build command works fine when run in the package folder as npm run build (although on first launch it asks twice to install the admin dependencies).

@TriPSs
Copy link
Owner

TriPSs commented Nov 14, 2023

Hi, can you make sure you use the latest @nx-extend/strapi with the latest Strapi? (Version 7.0.0 of @nx-extend/strapi had this issue, which was fixed in 7.0.1)

Thanks for the repo but I don't see any Strapi projects?

@certainlyakey
Copy link
Author

Hey, sorry forgot to add a commit with it 🤦‍♀️. Now it's there. The example repo should use 7.0.1.

@TriPSs
Copy link
Owner

TriPSs commented Nov 15, 2023

I see the issue, Strapi complelty changed their build pipeline which is now causing issues. If you dowgrade strapi to "4.15.0" it should work again until we update the build generator in @nx-extend.

@certainlyakey
Copy link
Author

Alright, thanks for letting me know, I will try to downgrade Strapi then and see if that works.

@certainlyakey
Copy link
Author

Downgraded Strapi and related plugin packages to "4.15.0" (strict dependency) in the example project and my real project - it's unfortunately still the same Package subpath './dist/commands/builders/admin' is not defined by "exports" error.

This was linked to pull requests Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants