Webapps using nextjs fail with latest version #880

Closed
opened 2024-07-22 04:19:29 +00:00 by dboreham · 6 comments
Owner

See this bug comment for details on the build command having changed in a minor nextjs update.

See [this bug comment](https://github.com/vercel/next.js/discussions/46544#discussioncomment-9113133) for details on the build command having changed in a minor nextjs update.
Author
Owner

Log output from our host container build failure looks like this:

> snowball-nextjs-pwa-starter@0.0.1 cerc_compile
> next experimental-compile

 ⨯ Invalid project directory provided, no such directory: /app/experimental-compile

Log output from our host container build failure looks like this: ``` > snowball-nextjs-pwa-starter@0.0.1 cerc_compile > next experimental-compile ⨯ Invalid project directory provided, no such directory: /app/experimental-compile ```
telackey was assigned by dboreham 2024-07-22 04:20:10 +00:00
Author
Owner

Re-test fails:

Request ID:bafyreick3n5eqqd5aa7r4tn52nnvbal6on2p6gfcmqu36xpoxwhsevs2oe
Application:crn://snowballtools/applications/pwa-nextjs-app-router@0.0.1
Last Update:2024-07-26T23:07:48Z
Last State:ERROR

Same error as before:

> snowball-nextjs-pwa-starter@0.0.1 cerc_compile
> next experimental-compile

 ⨯ Invalid project directory provided, no such directory: /app/experimental-compile

Re-test fails: ``` Request ID:bafyreick3n5eqqd5aa7r4tn52nnvbal6on2p6gfcmqu36xpoxwhsevs2oe Application:crn://snowballtools/applications/pwa-nextjs-app-router@0.0.1 Last Update:2024-07-26T23:07:48Z Last State:ERROR ``` Same error as before: ``` > snowball-nextjs-pwa-starter@0.0.1 cerc_compile > next experimental-compile ⨯ Invalid project directory provided, no such directory: /app/experimental-compile ```
Author
Owner

Investigating this a bit, I noticed that the test-pwa project specifies "latest" for next, and yarn why reports the version used as 14.2.5.
When that project is deployed the deployer runs the old command:

> next experimental-compile

Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

   ▲ Next.js 14.0.1
   - Environments: .env
Investigating this a bit, I noticed that the test-pwa project specifies "latest" for next, and `yarn why` reports the version used as 14.2.5. When that project is deployed the deployer runs the old command: ``` > next experimental-compile Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry ▲ Next.js 14.0.1 - Environments: .env ```
Author
Owner

One problem is that the test app we used to verify this fix is not using the right version of next:

$ npm list next
@cerc-io/test-progressive-web-app@0.1.42 /home/david/projects/cerc/test-progressive-web-app
├─┬ next-pwa@5.6.0
│ └── next@14.0.1 deduped
└── next@14.0.1
One problem is that the test app we used to verify this fix is not using the right version of next: ``` $ npm list next @cerc-io/test-progressive-web-app@0.1.42 /home/david/projects/cerc/test-progressive-web-app ├─┬ next-pwa@5.6.0 │ └── next@14.0.1 deduped └── next@14.0.1 ```
Author
Owner

The test app also fails deployment in the same way:

> @cerc-io/test-progressive-web-app@0.1.43 cerc_compile
> next experimental-compile

 ⨯ Invalid project directory provided, no such directory: /app/experimental-compile

The test app also fails deployment in the same way: ``` > @cerc-io/test-progressive-web-app@0.1.43 cerc_compile > next experimental-compile ⨯ Invalid project directory provided, no such directory: /app/experimental-compile ```
Author
Owner

Fixed

Fixed
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#880
No description provided.