Skip to content
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

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'version') #19314

Closed
7 tasks done
muhammedjafer opened this issue Jan 29, 2025 · 1 comment
Closed
7 tasks done

Comments

@muhammedjafer
Copy link

muhammedjafer commented Jan 29, 2025

Describe the bug

I am using inertia with vue laravel, everything works on local but on production whenever i redirect the user to other pages vite will pop up undefined reading version. what could be the problem. i use laravel forge for deployment.

Reproduction

npm run build

Steps to reproduce

No response

System Info

here is my vite config:
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import laravel from "laravel-vite-plugin";
import vuetify from "vite-plugin-vuetify";
import * as path from "path";

export default defineConfig({
    plugins: [
        laravel({
            input: ["resources/scripts/app.ts"],
            refresh: true,
        }),
        vue(),
        vuetify({
            autoImport: true,
        }),
    ],
    css: {
        preprocessorOptions: {
            scss: {
                additionalData: `
                    @use "@/sass/_new-wireframe-variables" as vars;
                    @use "@/sass/v2/style.scss";
                `,
                api: 'modern-compiler',
            },
        },
    },
    resolve: {
        alias: {
            "@": path.resolve(__dirname, "resources"),
        },
    },
    optimizeDeps: {
        include: ["laravel-vite-plugin"],
        exclude: ["fsevents"],
        esbuildOptions: {
            target: "esnext",
            loader: {
                ".ts": "ts",
            },
        },
    },
    server: {
        hmr: {
            host: "localhost",
        },
    },
});

Used Package Manager

npm

Logs

Image

No response

Validations

Copy link

Hello @muhammedjafer. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants