Skip to content

23.2 breaks a few packages that use json trough webpack (date-fns) #55826

@ThomasAunvik

Description

@ThomasAunvik

Version

v23.2.0

Platform

Linux arch 6.11.6-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:35 +0000 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Use a package that includes for example date-fns on a NextJS project.

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior? Why is that the expected behavior?

To build

What do you see instead?

 npm run build

> next build

   ▲ Next.js 15.0.3
   - Environments: .env

 ✓ Linting and checking validity of types    
   Creating an optimized production build ...
Failed to compile.

./node_modules/react-remove-scroll/dist/es2015/Combination.js + 22 modules
Unexpected end of JSON input

./node_modules/date-fns/format.js + 21 modules
Unexpected end of JSON input

./node_modules/date-fns/locale/fr.js + 5 modules
Unexpected end of JSON input


> Build failed because of webpack errors

Additional information

Seems to be a newly arrived issue only for 23.2.

Tested with 23.1 and 23.0 with no issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionIssues related to regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions