This error occurs when the compiler cannot parse the JavaScript or TypeScript of a file. The message shows the location and the explanation from the parser.
Reported
export const props = style("p-4";SW10001: JavaScript parse error
Expected `,` or `)` but found `;`
Fixed
export const props = style("p-4");How to fix
- Fix the syntax at the location in the message, as in the example.
- If the file parses in your editor, check that the integration treats it as the
right language, such as TypeScript with JSX for a
.tsxfile.
Errors in code that a Vue, Svelte, or Astro converter generated are reported as SW31004 instead.