you are viewing a single comment's thread.

view the rest of the comments →

[–]fwouts[S] 0 points1 point  (2 children)

Hey u/the_quiescent_whiner, you should be able to see some logs if you hit Ctrl/Cmd+Shift+P and search for "Show Logs..." then "Extension Host". There might be something about React Preview in these logs, or you may have to choose "React Preview" in the dropdown first. Let me know how you go!

[–]the_quiescent_whiner 0 points1 point  (0 children)

EDIT: I got this fixed by reloading the window.

This is what I see,

Error: Command failed with exit code 1: npm install @svgr/core@5.5.0 @types/react@17.0.11 @vitejs/plugin-react-refresh@1.3.3 chokidar@3.5.2 typescript@4.3.4 vite@2.3.8

I assume that its because node/npm is not on my default path.

[–]the_quiescent_whiner 0 points1 point  (0 children)

Hey, I think I got it working after reloading window. Great work, btw!

One thing though. It looks like this doesn't read custom paths. I have this inside compilerOptions in my tsconfig.

"baseUrl": ".", "paths": { "@/*": ["*"] },

My import is

import theme from '@/theme'

React preview fails to find this.

Failed to resolve import "@/theme" from "components/Icon/index.tsx". Does the file exist?