Static build fails: “File 'src/app/page.js' is not a module” after migration/cleanup (validator bug) #83540
Replies: 8 comments 3 replies
-
Do you maybe have, |
Beta Was this translation helpful? Give feedback.
-
What do you mean?
…On Mon, Sep 8, 2025, 4:47 AM Joseph ***@***.***> wrote:
Do you maybe have, app, src/pages or pages, src/app kind of setup?
—
Reply to this email directly, view it on GitHub
<#83540 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BV2NMKDKTIP57FVJFH2I4CD3RU7AZAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZTG44DGNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I can send you a screenshot of it later today
…On Mon, Sep 8, 2025, 8:40 AM Joseph ***@***.***> wrote:
What do you mean here?
There is no code in app—all code is in app and components.
This looks like you may have an empty page file. Without a repository or
some screenshots of the project is gonna be hard to guess.
—
Reply to this email directly, view it on GitHub
<#83540 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BV2NMKCKLL6WOKDW7ZRG5A33RV2MTAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZUGAYTEMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
On Mon, Sep 8, 2025, 8:52 AM Malu Omeonga Jr ***@***.***>
wrote:
… I can send you a screenshot of it later today
On Mon, Sep 8, 2025, 8:40 AM Joseph ***@***.***> wrote:
> What do you mean here?
>
> There is no code in app—all code is in app and components.
>
> This looks like you may have an empty page file. Without a repository or
> some screenshots of the project is gonna be hard to guess.
>
> —
> Reply to this email directly, view it on GitHub
> <#83540 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BV2NMKCKLL6WOKDW7ZRG5A33RV2MTAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZUGAYTEMQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
How can I send the screenshots? It doesn't allow me to due to file size
requirements
…On Mon, Sep 8, 2025, 4:47 AM Joseph ***@***.***> wrote:
Do you maybe have, app, src/pages or pages, src/app kind of setup?
—
Reply to this email directly, view it on GitHub
<#83540 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BV2NMKDKTIP57FVJFH2I4CD3RU7AZAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZTG44DGNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Did you get my email?
On Mon, Sep 8, 2025, 2:55 PM Malu Omeonga Jr ***@***.***>
wrote:
… How can I send the screenshots? It doesn't allow me to due to file size
requirements
On Mon, Sep 8, 2025, 4:47 AM Joseph ***@***.***> wrote:
> Do you maybe have, app, src/pages or pages, src/app kind of setup?
>
> —
> Reply to this email directly, view it on GitHub
> <#83540 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BV2NMKDKTIP57FVJFH2I4CD3RU7AZAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZTG44DGNQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Ok, I will try that.
…On Tue, Sep 9, 2025, 4:17 PM Joseph ***@***.***> wrote:
Aha, you'd need to upload them to the Github discussion thread. If it is
private or sensitive information DO NOT share it.
Not sure what the issue could be though - maybe move the project into a
sub folder? C:/my-apps/ws-ui-new-fresh- not sure why that'd work, but
might as well try it. Otherwise I don't know.
—
Reply to this email directly, view it on GitHub
<#83540 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BV2NMKEO5ZOSU3AJFCENXUL3R4YVZAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZVGU3DCNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
But where is the validator bug coming from?
On Tue, Sep 9, 2025, 4:18 PM Malu Omeonga Jr ***@***.***>
wrote:
… Ok, I will try that.
On Tue, Sep 9, 2025, 4:17 PM Joseph ***@***.***> wrote:
> Aha, you'd need to upload them to the Github discussion thread. If it is
> private or sensitive information DO NOT share it.
>
> Not sure what the issue could be though - maybe move the project into a
> sub folder? C:/my-apps/ws-ui-new-fresh- not sure why that'd work, but
> might as well try it. Otherwise I don't know.
>
> —
> Reply to this email directly, view it on GitHub
> <#83540 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BV2NMKEO5ZOSU3AJFCENXUL3R4YVZAVCNFSM6AAAAACF3ROWRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZVGU3DCNQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Describe the bug After migrating all code to the new app and components directories and removing all legacy files, the Next.js static build fails with the following error:
Type error: File 'C:/ws-ui-new-fresh/src/app/page.js' is not a module.
There is no code in app—all code is in app and components.
I have tried:
Upgrading and downgrading Next.js
Cleaning .next and reinstalling dependencies
Creating placeholder files in app
Ensuring all imports and configs are correct
The validator still references old, deleted files and blocks the build.
Dev mode works fine; only static build is broken.
Expected behavior The build should succeed when all code is in the correct modern locations and no legacy files remain.
System info
Next.js version: 15.5.2 (also tried other recent versions)
Node.js version: [your version]
OS: Windows
Additional context This is blocking production deployment. Please advise or fix as soon as possible.
Copy and paste this into https://github.com/vercel/next.js/issues/new/choose (choose “Bug report”). Add your Node.js version if you can.
Let me know if you want to add or change anything!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions