Whenever I attempt to execute npm run dev
, the dev server initiates but encounters the following error:
Cannot start nuxt: Cannot find module '@volar/typescript/lib/node/proxyCreateProgram
Require stack:
- node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\prepareVueTsc.js
I have tried installing @volar and vite-plugin-checker as dependencies, yet the server still fails to run. Could it be that I am missing a dependency or misconfiguring something in my project? My setup includes Vue 3 with Nuxt 3 library, and I aim to perform type checking on my code upon server startup, although I acknowledge the impact on performance. Despite installing vue-tsc@^1 and typescript (as per the documentation here: https://nuxt.com/docs/guide/concepts/typescript), the server remains unable to run.
Below is a snippet from my nuxt.config.ts:
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
ssr: false,
// Global page headers: https://go.nuxtjs.dev/config-head
app: {
head: {
title: "customer-portal-frontend",
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ hid: "description", name: "description", content: "" },
{ name: "format-detection", content: "telephone=no" },
],
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
},
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
"@/assets/css/main.scss",
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
[
"@nuxtjs/i18n",
{
defaultLocale: "en",
locales: [
{
code: "en",
file: "en-US.js",
name: "English",
},
{
code: "es",
file: "es-ES.js",
name: "Español",
},
{
code: "fr",
file: "fr-FR.js",
name: "Français",
},
],
lazy: true,
langDir: "lang/",
strategy: "no_prefix",
},
],
"nuxt-auth-utils", "@pinia/nuxt"],
runtimeConfig: {
public: {
baseURL: process.env.BASE_URL || "http://localhost:3012/",
},
app: {
baseURL: process.env.BASE_URL || "http://localhost:3012/"
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
typescript: {
typeCheck: true
},
})