Static build fails: “File 'src/app/page.js' is not a module” after migration/cleanup (validator bug) #83540
Unanswered
echoblue-98
asked this question in
Help
Replies: 5 comments 1 reply
-
Do you maybe have, |
Beta Was this translation helpful? Give feedback.
0 replies
-
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.
1 reply
-
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.
0 replies
-
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.
0 replies
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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