#Remix with Turborepo and getting Typescript to play nice

1 messages · Page 1 of 1 (latest)

clear aurora
#

has anyone successfully gotten all 3 to play nicely? I've been able to get success with Turborepo+Remix and having it build, but VSCode gets unhappy and underlines everything in the .tsx files.

I'm using the default tsconfig that comes with Remix and if I swap out "jsx":"react-jsx" to just react it clears some things but don't think this is the appropriate way.

The common error I'm running into is ```
Cannot find module 'react/jsx-runtime' or its corresponding type declarations.ts(2307)

Doesn't seem to adversely affect anything, I just want to learn how to tame TS a bit more.

I'm using React 18.

EDIT: This seems to be the issue: https://github.com/vitejs/vite/issues/8557
GitHub

Describe the bug Testing the main branch (including #8546) since vite@3-alpha10 doesn't work for production builds of Ladle. checkout https://github.com/tajo/ladle/tree/test-vite assumes it...

lapis lava
clear aurora
#

ty. i cloned your repo and this is what im talking about:

#

im also running pnpm

#

atm, im doing the following as a workaround just to make vscode happy:

inside tsconfig:

    "paths": {
      "react/jsx-runtime":["../../node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js"]
    }
lapis lava
#

odd tsc seems okay for me

lapis lava
#

confirmed, my vscode is happy 🤷‍♂️

marble hatch
#

I'm trying to build a repo similar to the one linked above and everything is building fine but when code is changed in the ui-package the remix app is not updated until I make a change in the remix app. Does anyone know a way around this, would be great if it could reload automatically.