N
Nuxt10mo ago
Bobbo

baseUrl is gone from .nuxt/tsconfig.json, vue-tsc and vitest are now broken.

I was following the instructions on here to setup tests so I could test one of my Pinia stores. I had an issue with vitest failing to resolve ~ and @ aliased imports. In order to install the extra stuff I didn't already have (@pinia-testing) I updated a bunch of my dependencies, here is the diff on my package.json;
--- a/package.json
+++ b/package.json
@@ -15,22 +15,22 @@
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/vue-fontawesome": "^3.0.3",
"@microsoft/signalr": "^7.0.5",
- "@nuxt/test-utils": "^3.6.2",
+ "@nuxt/test-utils": "^3.12.0",
"@pinia/nuxt": "^0.4.11",
+ "@pinia/testing": "^0.1.3",
"@types/lodash": "^4.14.194",
"@types/node": "^18",
"@types/qrcode": "^1.5.0",
"@types/uuid": "^9.0.2",
"@vitejs/plugin-vue": "^4.2.3",
- "@vitest/coverage-v8": "^0.33.0",
- "@vue/test-utils": "^2.4.0",
+ "@vue/test-utils": "^2.4.5",
"@vueuse/core": "^10.1.2",
"autoprefixer": "^10.4.14",
"dayjs": "^1.11.7",
"jsdom": "^22.1.0",
"lodash": "^4.17.21",
- "nuxt": "^3.5.0",
- "pinia": "^2.0.26",
+ "nuxt": "^3.11.1",
+ "pinia": "^2.1.7",
"postcss": "^8.4.23",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.2.7",
@@ -38,11 +38,14 @@
"smoothie": "^1.36.1",
"tailwindcss": "^3.3.2",
"uuid": "^9.0.0",
- "vitest": "^0.32.4",
+ "vitest": "^1.4.0",
"vue3-touch-events": "^4.1.2"
},
"dependencies": {
"chart.js": "^4.3.0",
"vue-chartjs": "^5.2.0"
+ },
+ "overrides": {
+ "vue": "latest"
}
}
--- a/package.json
+++ b/package.json
@@ -15,22 +15,22 @@
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/vue-fontawesome": "^3.0.3",
"@microsoft/signalr": "^7.0.5",
- "@nuxt/test-utils": "^3.6.2",
+ "@nuxt/test-utils": "^3.12.0",
"@pinia/nuxt": "^0.4.11",
+ "@pinia/testing": "^0.1.3",
"@types/lodash": "^4.14.194",
"@types/node": "^18",
"@types/qrcode": "^1.5.0",
"@types/uuid": "^9.0.2",
"@vitejs/plugin-vue": "^4.2.3",
- "@vitest/coverage-v8": "^0.33.0",
- "@vue/test-utils": "^2.4.0",
+ "@vue/test-utils": "^2.4.5",
"@vueuse/core": "^10.1.2",
"autoprefixer": "^10.4.14",
"dayjs": "^1.11.7",
"jsdom": "^22.1.0",
"lodash": "^4.17.21",
- "nuxt": "^3.5.0",
- "pinia": "^2.0.26",
+ "nuxt": "^3.11.1",
+ "pinia": "^2.1.7",
"postcss": "^8.4.23",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.2.7",
@@ -38,11 +38,14 @@
"smoothie": "^1.36.1",
"tailwindcss": "^3.3.2",
"uuid": "^9.0.0",
- "vitest": "^0.32.4",
+ "vitest": "^1.4.0",
"vue3-touch-events": "^4.1.2"
},
"dependencies": {
"chart.js": "^4.3.0",
"vue-chartjs": "^5.2.0"
+ },
+ "overrides": {
+ "vue": "latest"
}
}
I now have the issue that baseUrl: ".." is gone from my .nuxt/tsconfig.json. I can't seem to bring it back either through any of the documented settings. If I manually edit it, vue-tsc works again, except now it reports nearly 400 errors (before I had 2, a bunch of these seem to be failed alias imports) vitest still can't resolve aliased imports.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server