Comments (2)
If anyone's interested, I published the fork as @ferm10n/[email protected]
from vetur.
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)
- 更新到最新版本0.37.2,保存时 [object Promise] HOT 18
- please only support vue2, do not support vue3 HOT 3
- 格式化文件特别慢,要很长时间才能保存文件。 HOT 7
- 影响,代码块折叠 , 文件跳转,方法跳转 ,方法是否引用提示 HOT 2
- Request textDocument/codeAction failed with message: HOT 5
- Vetur Keeps loading in my Vue 2 project HOT 1
- 0.37.1及以上版本会导致vscode部分代码提示插件失效,回退以下版本正常 HOT 1
- javascript automatic how do? HOT 1
- highlight error when use typeof in v-if HOT 1
- global vls command not working
- Vue language Server is breaking in typescript 5.x HOT 11
- The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.Vetur(1343) HOT 3
- Request textDocument/documentSymbol failed with message: Cannot set property createLanguageServiceSourceFile of #<Object> which has only a getter HOT 1
- Syntax highlighting in vscode
- [VLS] add support to CSS container query unit
- Question: Support for HTML highlighting in "template literal" strings in .JS files?
- Unable to comment on a single line inside a vue file HOT 1
- The JS/TS language service immediately crashed 5 times. The service will not be restarted HOT 1
- at-rule or selector expected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vetur.