Error launching build with version v4.4.1 and v4.4.2 #2321
Replies: 14 comments 13 replies
-
Here's an example:
|
Beta Was this translation helpful? Give feedback.
-
Same for our Nuxt project, but can't reproduce in plain empty project. Weird... |
Beta Was this translation helpful? Give feedback.
-
Same issue here - I'll try to work on a reproduction as this issue hasn't provided one, but I'm super busy today so I dunno when I'll be able to provide it! If anyone else can provide one first that would be great :) |
Beta Was this translation helpful? Give feedback.
-
Speculate that the error occurred between |
Beta Was this translation helpful? Give feedback.
-
This is also happening to me while using https://github.com/unplugin/unplugin-auto-import. After the upgrade, I see lots of errors. Looks like |
Beta Was this translation helpful? Give feedback.
-
Have you found a fix for this? |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
@posva I'm sorry for the previous, I didn't want to anger you. I've misunderstood moving the issue to a discussion as if it wasn't important and was delayable. I've not added more details because of lack of time and because I thought there wasn't much to say: I've made no changes from the previous version (v4.4.0) and after I upgraded (automatically, launching an npm i, because I had set version like this -> "^4.4.0" in the packages.json) to both the versions every $route or $router version usage in TS code was marked as error. I still think that, if this change was made to fix problems for other users and it's not an error, it shouldn't be made in a patch version simply because of the fact that is breaking, don't you think? In order to add some information to help you, I upgraded in multiple projects and this bug happens in all of them. |
Beta Was this translation helpful? Give feedback.
-
Are there any updates? It's hard to tell what is wrong. I would love to help otherwise. I find all my modules with typescript, specifically with |
Beta Was this translation helpful? Give feedback.
-
Problem has been solved for us with unimport@3.10. |
Beta Was this translation helpful? Give feedback.
-
I've had the same problem with this code since I upgraded to version 4.4.2 of vue-router. "export let $t: ComponentCustomProperties['$t'];" |
Beta Was this translation helpful? Give feedback.
-
Interesting... I use https://github.com/antfu-collective/vitesse/ as a template. And I noticed that project has also been updated to |
Beta Was this translation helpful? Give feedback.
-
I'm experiencing the same issue. export default myPlugin;
declare module 'vue' {
interface ComponentCustomProperties {
$sanitize: typeof sanitize;
}
}
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$sanitize: typeof sanitize;
}
} This should follow the official doc instructions: https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties Only using the 2nd type fixes the error for me: export default myPlugin;
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$sanitize: typeof sanitize;
}
} |
Beta Was this translation helpful? Give feedback.
-
I'm confused why this is a discussion and not an issue. Literally all of my projects are broken because of this unless I revert back to vue-router version 4.4.0. I will try and make a test case. |
Beta Was this translation helpful? Give feedback.
-
Reproduction
Launch the build
Steps to reproduce the bug
Launch npm run build
Expected behavior
Build ends correctly
Actual behavior
Build show error for every usage of $route and $router in TypeScript
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions