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 build issue with @nx-extend/strapi #302

Closed
fallingforest opened this issue Aug 21, 2024 · 4 comments
Closed

Strapi build issue with @nx-extend/strapi #302

fallingforest opened this issue Aug 21, 2024 · 4 comments

Comments

@fallingforest
Copy link

I got the issue when building Strapi with @nx-extend/strapi

 ⠋ Building admin panel
⠼ Building admin panelModule not found: Error: Can't resolve './.strapi/client/app.js' in '/home/my-monorepo'
✖ Building admin panel

 NX   Unknown error caught

I can run yarn build in the strapi folder without issue but when running with nx, it happened.

This is my build target:

    "build": {
          "executor": "@nx-extend/strapi:build",
          "options": {
            "production": true,
            "tsConfig": "apps/platform-api/tsconfig.json",
            "outputPath": "dist/apps/platform-api",
            "root": "apps/platform-api",
            "generateLockFile": true
          }
        }
@TriPSs
Copy link
Owner

TriPSs commented Aug 21, 2024

Can you run nx report? Also the Strapi version installed locally should match the Strapi version of the package.

@fallingforest
Copy link
Author

fallingforest commented Aug 21, 2024

@TriPSs This is the output of the nx report, and the Strapi version was 4.25.4

Report complete - copy this into the issue template

Node           : 20.16.0
OS             : linux-x64
Native Target  : x86_64-linux
yarn           : 1.22.22

nx (global)        : 19.5.6
nx                 : 19.5.7
@nx/js             : 19.5.7
@nx/jest           : 19.5.7
@nx/linter         : 19.5.7
@nx/eslint         : 19.5.7
@nx/workspace      : 19.5.7
@nx/cypress        : 19.5.7
@nx/devkit         : 19.5.7
@nx/eslint-plugin  : 19.5.7
@nx/nest           : 19.5.7
@nx/next           : 19.5.7
@nx/node           : 19.5.7
@nx/react          : 19.5.7
@nx/storybook      : 19.5.7
@nrwl/tao          : 19.5.7
@nx/vite           : 19.5.7
@nx/web            : 19.5.7
@nx/webpack        : 19.5.7
typescript         : 5.5.4
---------------------------------------
Community plugins:
@nx-extend/strapi                : 11.0.0
@nx-tools/nx-container           : 5.3.1
@trumbitta/nx-plugin-unused-deps : 1.12.1

@TriPSs
Copy link
Owner

TriPSs commented Aug 21, 2024

Could you create a repo that has this issue?

@fallingforest
Copy link
Author

After created the new monorepo with @nx-extend/strapi. I found the problem was missing the webpack.config.js in the /src/admin directory of strapi project.

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

No branches or pull requests

2 participants