You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated a project to Vite 3.1.0 (from 3.0.9) and am now getting the following error in 'dev' mode only.
21:57:35 [vite] Internal server 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.
Plugin: vite:import-analysis
File: C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/@thisbeyond/solid-dnd/dist/source/sortable-context.jsx?v=a83c0c67
39 | return <Context.Provider value={context}>{props.children}</Context.Provider>;
40 | };
41 | const useSortableContext = () => {
| ^
42 | return useContext(Context) || null;
43 | };
at formatError (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:40782:46)
at TransformContext.error (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:40778:19)
at TransformContext.transform (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:37449:22)
at async Object.transform (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:41031:30)
at async loadAndTransform (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:37292:29)
Note: vite build completes successfully. Also the error was not present with Vite 3.0.9
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
@sapphi-red thanks - I tried your suggestion. It does clear the jsx analysis error. However, it then results on page load in a console error of Uncaught TypeError: (intermediate value)() is null.
Which seems to be the result of now duplicate versions of the same module being resolved - e.g.
Describe the bug
I updated a project to Vite 3.1.0 (from 3.0.9) and am now getting the following error in 'dev' mode only.
Note:
vite build
completes successfully. Also the error was not present with Vite 3.0.9Reproduction
Clone https://github.com/thisbeyond/solid-dnd-site and then update to vite 3.1.0. Run
npx vite
to see error.System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: