Skip to content

main.js file contains html code instead of javascript Functions #4260

Closed
@lisandrolan

Description

@lisandrolan

Hi,
When I try to build the CRA in a node server, the main.js contains HTML code, thus I get the error.
Uncaught SyntaxError: Unexpected token <

I also dont see all the node modules generated into the static/js folder of the build.

When I deploy on the localhost it works as expected.
Also, another project is working as expected.

I see that react-script package.json is different between these 2 project.

I've tried deleting all the node_modules folders and I have the same error.
Also, I've tried using the same version of the package.json object and there is no success.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions