-
Notifications
You must be signed in to change notification settings - Fork 26
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
Cannot find base config file @vue/tsconfig/tsconfig.web.json #13
Comments
Quotes from the README:
|
I use typescript v5
…On Wed, Apr 26, 2023, 3:39 PM Alex | Kronox ***@***.***> wrote:
Quotes from the README:
Requires TypeScript >= 5.0. For TypeScript v4.5 to v4.9, please use v0.1.x
***@***.***/tsconfig/v/0.1.3>.
Migrating from TypeScript < 5.0
The usage of base tsconfig.json is unchanged.
tsconfig.web.json is now renamed to tsconfig.dom.json, to align with
@vue/runtime-dom and @vue/compiler-dom.
—
Reply to this email directly, view it on GitHub
<#13 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBDS7TSFPFHETZR3JIP7UTXDF2XNANCNFSM6AAAAAAXMJ7D5E>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
then to my understanding you just need to change the name of the file in the extends part
|
Thanks for the info. I seem to be getting closer. I have a tsconfig.json file which extends the tsconfig.web.json. I changed that to tsconfig.dom.json as you mentioned. I also have a tsconfig.config.json which extends tsconfig.node.json. When doing an npm run build I get an TSConfckParseError: failed to resolve "extends":"@vue/tsconfig/tsconfig.node.json" error. So, I also changed that to extend tsconfig.dom.json and it got further but then gave me the following error:
FWIW I am using the latest Vuetify v3.1.16. This error did not occur before. Is there another place I should be pointing tsconfig.node.json to besides tsconfig.dom.json? Thanks! |
The README futher says:
So read this for the in detail describtion for how to migrate the |
Hi, thanks for pointing me in that direction. I am still experiencing similar issues... perhaps I'm unclear on which file(s) to change and where to reference 'vuetify'. (I have tried removing the vuetify ref from either/both files). This is what I currently have:
tsconfig.json
tsconfig.config.json
Then try to build:
|
Does it compile when you remove Alternativly does it help when you change |
If I remove the 'types' as you suggested it compiles but throws tons of lint-type errors about not finding Vuetify. For example "error TS2307: Cannot find module 'vuetify/lib/components/index' or its corresponding type declarations" If I modify the extends as you suggested (while also keeping 'types' modified as you suggested) I get the same errors as above If I modify the extends as you suggested (but undo the 'types' modification you suggested) I get compile errors: error TS2688: Cannot find type definition file for 'vuetify'. |
Just an fyi, but these *may be related? vuetifyjs/vuetify#17211 |
May be possible, I'll have a deeper look at it later. |
Hmm, there is no vuetify subfolder under that path. I deleted the package-lock.json file and re-ran npm install but it never creates that at that location. FWIW here's my package.json file
|
also afaik there is no @types/vuetify dependency. If I add one I get the 404 '@types/vuetify@^3.1.16' is not in this registry message |
I'm experiencing similar issues. What I did:
When I run src/features/home/view/homeView.vue:4:10 - error TS2339: Property '$t' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => ...'.
4 <h1>{{ $t('home.greeting') }}</h1>
~~ or src/features/machineDetail/components/MachineDetailDatetimeFilter.vue:4:25 - error TS7016: Could not find a declaration file for module 'vue-i18n'. 'XXX/node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js' implicitly has an 'any' type.
There are types at 'C:/_source/stuertz/Cloud/Stuertz.Frontend/node_modules/vue-i18n/dist/vue-i18n.d.ts', but this result could not be resolved when respecting package.json "exports". The 'vue-i18n' library may need to update its package.json or typings.
import { useI18n } from 'vue-i18n';
~~~~~~~~~ Is this an issue with the |
Just experimented a bit on my machine, could not recreate the issue tho.
Yes that is true. Afaik the types file is in the @vuetify folder, so maybe adding this to the tsconfig file where you import vuetifys types helps: |
Could I see your package.json? |
Sure, here it is: clickpackage.json{
"name": "xxx",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"test": "vitest --environment jsdom --root src/",
"test:unit": "vitest run --environment jsdom --root src/",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/vue-fontawesome": "^3.0.3",
"@intlify/unplugin-vue-i18n": "^0.10.0",
"@vueuse/core": "^10.1.0",
"echarts": "^5.4.2",
"naive-ui": "^2.34.3",
"pinia": "^2.0.35",
"vue": "^3.2.47",
"vue-echarts": "^6.5.5",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.2.0",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.16.0",
"@vitejs/plugin-vue": "^4.2.0",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/test-utils": "^2.3.2",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.39.0",
"eslint-plugin-vue": "^9.11.0",
"jsdom": "^21.1.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"sass": "^1.62.0",
"typescript": "~5.0.4",
"vite": "^4.3.1",
"vitest": "^0.30.1",
"vue-tsc": "^1.4.4"
}
} |
I am not 100% sure, but from the error message and looking at your, vue-i18n und this repos package.json I would have guessed the issue lies with vue-i18n, since its the only place I could find a "exports" statement, but as I said, not completly sure |
No luck. I added it to the compilerOptions for both tsconfig.json and tsconfig.config.json and I still get the error TS2688: Cannot find type definition file for 'vuetify'.
|
Hi!! I've experimented same problems too afer update to latest tsconfig version In my case I build in run ok, but I've got problems typing-check: vue-tsc --noEmit -p tsconfig.vitest.json --composite false" `` vue-tsc --noEmit -p tsconfig.vitest.json --composite false`
Thanks for your help |
Hi, same problem for me for the I fix my problem by set the |
FWIW I have the same issue that @throrin19 and @sabifa are reporting, with Any advice on what kind of fix needs to be made in the
This message is very vague to me... |
There's probably a reason a new Vue 3 project ships with version |
Any update on this issue? It still fails with the latest v0.4.0 |
I think I have it resolved. The newest version of vuetify is causing my issues (v3.3.1) Reverting to v3.2.5 seems to make them go away. FWIW here are my working files: tsconfig.json
tsconfig.config.json
package.json (trimmed down to only show relevant packages)
|
@UglyHobbitFeet I think you have to make an issue into vuetify to make them fix this problem 👍 |
I had the same issue running a cloned project from another company using VS Code after running 'npm install' and 'npm audit fix'. If this sounds familiar, restarting VS Code solved the issue. The file was there, but VS Code needed to reload for the error to resolve itself. |
I upgraded from 0.1.3 to 0.3.2 and am now seeing the error "Cannot find base config file @vue/tsconfig/tsconfig.web.json"
Full stacktrace is below:
The text was updated successfully, but these errors were encountered: