Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vague error - Pre-transform error: Failed to parse source for #18754

Closed
7 tasks done
sanjarcode opened this issue Nov 25, 2024 · 1 comment · Fixed by #18764
Closed
7 tasks done

Vague error - Pre-transform error: Failed to parse source for #18754

sanjarcode opened this issue Nov 25, 2024 · 1 comment · Fixed by #18764

Comments

@sanjarcode
Copy link

sanjarcode commented Nov 25, 2024

Describe the bug

In a React app, start the dev server

the error Pre-transform error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension. is shown, but the files causing it are not listed.

Problem

this is quite vague.

My app has a series of loaders, so I have to wait for all of them to settle.

Ideal behavior

the files causing it should be listed in the terminal itself.
if there a lot to print in the shell, at least first 5 should be listed.

Reproduction

private code

Steps to reproduce

pnpm run dev

System Info

mac, chrome, pnpm

Used Package Manager

pnpm

Logs

5:48:00 PM [vite] Pre-transform error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.

Validations

Copy link

Hello @sanjarcode. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants