GithubHelp home page GithubHelp logo

Comments (2)

ferm10n avatar ferm10n commented on June 2, 2024 2

If anyone's interested, I published the fork as @ferm10n/[email protected]

from vetur.

ferm10n avatar ferm10n commented on June 2, 2024

I'm also having this issue. I tried building vti from source without the terser plugin, so looking at the stack trace was actually helpful.

Issue comes from this bit here:

        ansiStyles.color.closeRe = new RegExp(escapeStringRegexp$1(ansiStyles.color.close), 'g');
                                                                                    ^

TypeError: Cannot read properties of undefined (reading 'close')

however, this is not from vti source. This made me think it's from a dependency change instead. I loaded the cli.js and cli.js.map files into https://evanw.github.io/source-map-visualization/ and saw that the offending line was originating from [email protected].

This is interesting because the dependency for vti requests chalk@^4. This is probably what the issue is!
So where was chalk@2 coming from, and how do we switch it back?

Doing a yarn why chalk showed that it came from @babel/code-frame -> @babel/highlight. Somehow it got hoisted up where it shouldn't and now the wrong version of chalk is bundled.

This is likely made worse because there are multiple yarn.lock files, one in the project root, and the other in the vti folder. This can lead to LOTS of confusing yarn behavior and it means there's not a clear source of truth for how this thing should be built lol.

I pushed a fork of vetur that modifies the package.json of vti to prevent this hoisting issue. It's not a proper fix, because there should only be one yarn.lock but it's good enough for now.

from vetur.

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.