-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Bug?]: Autocomplete and auto-import not working on v7.3.0 for JS projects #10422
Comments
Update!!I've been able to track this issue down to exactly this: VS Code uses its own bundled typescript. If you see here, VS Code 1.88 just got rolled out with typescript v5.4 - version 1.87 and previous versions were using typescript <= 5.3. That's why I had it breaking with Neovim but not VS Code. This is not something that affects Redwood exclusively. The simplest way to reproduce this bug is to create a Vite app using React + Typescript, install some package (Lucide or Jotai like I used as example, or any other), and just bring autocomplete to see if any imports show up. If you get your hands on VS Code >= 1.88, the same issue stated above should happen to you. Worth remembering that this is only affecting |
Thanks for the update @higajooj! That's some great detective work right there 🙂 🕵️ As a workaround for any VSCode users you can downgrade your RW project's TS version to 5.4.2 and then tell VSCode to use the workspace version of TS instead of its built-in version. Just click the TS version number in the status bar, and choose 5.4.2 in the popup you get at the top of the screen |
Thanks @Tobbe! Unfortunately 5.4.2 is also broken. The solution is to stay on 5.3.x for now. |
@higajooj BTW, is this only for RW projects, or do you see the same issue in other projects as well? |
@Tobbe, both Redwood and plain Vite apps are affected ( |
Fixed on TypeScript 5.4.5 microsoft/vscode#209849 (comment) |
Hey @higajooj, I just merged in the dependency upgrade, confirmed it fixed the problem for me locally then released it in v7.4.1. Can you confirm that v7.4.1 works as expected for you? |
It's working 👍🏻. I was using
to keep up with latest Redwood without breaking my dev environment. Thanks @Josh-Walker-GM and @Tobbe ! |
Fixed in #10452 |
What's not working?
Short after updating to v7.3.0 I started noticing some LSP problems. It turns out autocomplete barely works anymore with
.js, .jsx
files. I am using neovim 0.9.5.Previously (RW v7.1.3), when I typed:
useA
->import { useAtom } from 'jotai'
would show up, or<Bui
->import { Building } from 'lucide-react'
.Now, with RW 7.3, I don't get any autocompletion at all from any package installed, besides code from within my workspace (say,
import { useAuth } from 'src/auth'
, which works just fine).Also, when hitting
CTRL+Space
in the following situation, before I would get all possible imports.Now, nothing shows up.
I use typescript-language-server, but just to make sure this bug is not related with my editor, environment or LSP config, I also tested using vtsls and typescript-tools, results were still the same. I don't use any fancy configuration, and all other JavaScript projects I have (not using Redwood) works normally.
Now, two things worth mentioning.
.jsx
to.tsx
, everthing works normally just like before, so this is only affecting JavaScript files (.js
,.jsx
).js,.jsx
files.This is what bugs me the most. I work 90% slower on VS code and I also can't convert my whole project to TypeScript.
I also tried creating a brand new Redwood project (
yarn create redwood-app
), installed lucide-reactyarn workspace web add lucide-react
, and when I go to any.jsx
file (page, component, cell) nothing shows up (like the screenshot above).How do we reproduce the bug?
No response
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: