liferay / liferay-cli

Apache License 2.0
4 stars 5 forks source link

`liferay ext build` gets stuck on react tests #110

Closed allen-ziegenfus closed 1 year ago

allen-ziegenfus commented 1 year ago

When I run liferay ext build on the following extension the zip file is created, but the build process seems to hang and does not build the other client extensions in the project.

https://github.com/allen-ziegenfus/liferay-portal/tree/marketplace_poc_rebase/workspaces/liferay-marketplace-workspace/client-extensions/dashboard-remote-app

The output for liferay ext build -v shows the following and then nothing else happens:

> Task :client-extensions:dashboard-remote-app:createClientExtensionConfig
> Task :client-extensions:dashboard-remote-app:assembleClientExtension
> Task :client-extensions:dashboard-remote-app:buildClientExtensionZip
> Task :client-extensions:dashboard-remote-app:assemble

> Task :client-extensions:dashboard-remote-app:packageRunTest
yarn run v1.13.0
$ react-scripts test
PASS src/Dashboard.test.js
  ??? renders learn react link (46 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.494 s
Ran all test suites.

Maybe the build command should -xpackageRunTest?

gamerson commented 1 year ago

Hey Allen, I fixed this issue just earlier today. In your package.json, add this to the scripts test invocation

"test": "react-scripts test --passWithNoTests --watchAll=false",

On Thu, Dec 8, 2022 at 3:24 PM Allen Ziegenfus @.***> wrote:

When I run liferay ext build on the following extension the zip file is created, but the build process seems to hang and does not build the other client extensions in the project.

https://github.com/allen-ziegenfus/liferay-portal/tree/marketplace_poc_rebase/workspaces/liferay-marketplace-workspace/client-extensions/dashboard-remote-app

The output for liferay ext build -v shows the following and then nothing else happens:

Task :client-extensions:dashboard-remote-app:createClientExtensionConfig Task :client-extensions:dashboard-remote-app:assembleClientExtension Task :client-extensions:dashboard-remote-app:buildClientExtensionZip Task :client-extensions:dashboard-remote-app:assemble

Task :client-extensions:dashboard-remote-app:packageRunTest yarn run v1.13.0 $ react-scripts test PASS src/Dashboard.test.js ??? renders learn react link (46 ms)

Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: 1.494 s Ran all test suites.

Maybe the build command should -xpackageRunTest?

— Reply to this email directly, view it on GitHub https://github.com/liferay/liferay-cli/issues/110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERKFPTVHJTF6R3QRU4TG3WMJGZXANCNFSM6AAAAAASYTL7LA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Greg Amerson Liferay Cloud. liferay.com

allen-ziegenfus commented 1 year ago

@gamerson Oh great, that does fix it!