Giter Club home page Giter Club logo

Comments (9)

higajooj avatar higajooj commented on May 27, 2024 1

Thanks @Tobbe! Unfortunately 5.4.2 is also broken. The solution is to stay on 5.3.x for now.

from redwood.

higajooj avatar higajooj commented on May 27, 2024 1

It's working 👍🏻. I was using

  "resolutions": {
    "typescript": "5.3.2"
  }

to keep up with latest Redwood without breaking my dev environment.

Thanks @Josh-Walker-GM and @Tobbe !

from redwood.

higajooj avatar higajooj commented on May 27, 2024

Update!!

I've been able to track this issue down to exactly this:
chore(deps): update dependency typescript to v5.4.3

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 .js and .jsx files.

from redwood.

Tobbe avatar Tobbe commented on May 27, 2024

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
image
image
(I'm still on an older version of VSCode, and have 5.4.3 as my workspace version. Your numbers will look different)

from redwood.

Tobbe avatar Tobbe commented on May 27, 2024

@higajooj BTW, is this only for RW projects, or do you see the same issue in other projects as well?

from redwood.

higajooj avatar higajooj commented on May 27, 2024

@Tobbe, both Redwood and plain Vite apps are affected (npm create vite). I'm not sure about other frameworks.

from redwood.

higajooj avatar higajooj commented on May 27, 2024

Fixed on TypeScript 5.4.5

microsoft/vscode#209849 (comment)
microsoft/TypeScript#57740
microsoft/TypeScript#58115
microsoft/TypeScript#58113

from redwood.

Josh-Walker-GM avatar Josh-Walker-GM commented on May 27, 2024

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?

from redwood.

Josh-Walker-GM avatar Josh-Walker-GM commented on May 27, 2024

Fixed in #10452

from redwood.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.