chromaui / chromatic-cli

Chromatic CLI: `npx chromatic`
https://www.chromatic.com/docs/cli
MIT License
288 stars 71 forks source link

Publish to Chromatic fails with error: Cannot find module 'clean-webpack-plugin' #867

Open TamarLebelCohen opened 9 months ago

TamarLebelCohen commented 9 months ago

Description: Encountering a 'clean-webpack-plugin' module not found error while attempting to publish a library to Chromatic using 'chromaui/action@v1' in a GitHub Actions workflow. The issue arises during the webpack build process before the Chromatic publishing step.

Error Log:

`$ webpack [webpack-cli] Failed to load '/home/runner/work/bionic-design/bionic-design/webpack.config.js' config [webpack-cli] Error: Cannot find module 'clean-webpack-plugin' Require stack:

Context:

'clean-webpack-plugin' is specified in the project's package.json. The package is recognized in a previous step before the Chromatic publishing. The workflow uses 'chromaui/action@v1' for Chromatic integration. Expected Behavior: The webpack build should successfully recognize and load the 'clean-webpack-plugin' module during the Chromatic publishing workflow.

Steps to Reproduce:

GitHub Actions workflow using 'chromaui/action@v1.' Include Chromatic publishing step. Ensure 'clean-webpack-plugin' is listed in package.json. Run the workflow and observe the error during the webpack build. Additional Information: Workflow and relevant configuration files are available for further analysis upon request.

Thank you for your prompt attention to this matter.

Best regards, Tamar Cohen

Doron3 commented 9 months ago

same problem

galBionic commented 9 months ago

same

skitterm commented 9 months ago

Hi folks, does this issue still happen when using chromaui/action@latest instead of chromaui/action@v1? We've recently updated our CI documentation to recommend using @latest, along with a couple of other small changes to the example file that you may want to follow.