N
Nuxtβ€’4mo ago
LTroya

Error 500 Cannot find module ".output/server/node_modules/vue/server-renderer/index.mjs"

Hi guys, I am updating from 2.17 to 3.12.3 and I am getting the following error after executing nuxt build --preset=cloudflare-pages && nuxt preview Error 500 Cannot find module .output/server/node_modules/vue/server-renderer/index.mjs imported from /.output/server/chunks/routes/renderer.mjs After taking a look at that path I see there is not server-renderer folder inside the .output/server/node_modules/vue folder. Is there anything I am missing for that folder to appear on the .output/server/node_modules/vue folder?
No description
1 Reply
LTroya
LTroyaOPβ€’4mo ago
Here is what I can see on that .output/server/node_modules/vue folder. I would appreciate any hint πŸ™ Here is my current nuxt.config.ts configuration
import svgLoader from 'vite-svg-loader'
import { defineNuxtConfig, type NuxtConfig } from 'nuxt/config'
import type { ModuleOptions } from 'nuxt-graphql-request'
import {
PUBLIC_GRAPHQL_ENDPOINT,
} from './utils/constants'

const IS_PRODUCTION = process.env.CF_PAGES_BRANCH === 'production'

const runtimeConfig: { public: any } = {
public: {},
}

// Global CSS: https://go.nuxtjs.dev/config-css
const css = ['~/assets/main.scss']

const sourcemap = {
server: process.env.CONTEXT === 'production',
client: process.env.CONTEXT === 'production',
}

const modules: any[] = ['@nuxtjs/tailwindcss', 'nuxt-graphql-request']

const tailwindcss = {
exposeConfig: true,
viewer: false,
configPath: './tailwind.config.ts',
}

const graphql: Partial<ModuleOptions> = {
clients: {
default: {
endpoint: PUBLIC_GRAPHQL_ENDPOINT,
options: {
requireCredentials: false,
} as any,
},
authenticatedClient: {
endpoint: GRAPHQL_ENDPOINT,
options: {
requireCredentials: true,
} as any,
},
},
}

interface CustomNuxtConfig extends NuxtConfig {
eslint?: any
}

const config: CustomNuxtConfig = {
compatibilityDate: '2024-04-03',
// app: { head },
typescript: {
strict: false,
},
devServerHandlers: [],
vite: {
plugins: [svgLoader({ svgo: false })],
define: {
__DEV__: !IS_PRODUCTION,
global: 'window',
},
},
runtimeConfig,
sourcemap,
modules,
css,
tailwindcss,
ignore: ['playwright/**/*.spec.*', 'playwright-report/*', '.idea/*'],
graphql,
experimental: {
// externalVue: false,
defaults: {
nuxtLink: {
trailingSlash: 'append',
activeClass: 'nuxt-link-active',
exactActiveClass: 'nuxt-link-exact-active',
},
},
},
}

export default defineNuxtConfig(config)
import svgLoader from 'vite-svg-loader'
import { defineNuxtConfig, type NuxtConfig } from 'nuxt/config'
import type { ModuleOptions } from 'nuxt-graphql-request'
import {
PUBLIC_GRAPHQL_ENDPOINT,
} from './utils/constants'

const IS_PRODUCTION = process.env.CF_PAGES_BRANCH === 'production'

const runtimeConfig: { public: any } = {
public: {},
}

// Global CSS: https://go.nuxtjs.dev/config-css
const css = ['~/assets/main.scss']

const sourcemap = {
server: process.env.CONTEXT === 'production',
client: process.env.CONTEXT === 'production',
}

const modules: any[] = ['@nuxtjs/tailwindcss', 'nuxt-graphql-request']

const tailwindcss = {
exposeConfig: true,
viewer: false,
configPath: './tailwind.config.ts',
}

const graphql: Partial<ModuleOptions> = {
clients: {
default: {
endpoint: PUBLIC_GRAPHQL_ENDPOINT,
options: {
requireCredentials: false,
} as any,
},
authenticatedClient: {
endpoint: GRAPHQL_ENDPOINT,
options: {
requireCredentials: true,
} as any,
},
},
}

interface CustomNuxtConfig extends NuxtConfig {
eslint?: any
}

const config: CustomNuxtConfig = {
compatibilityDate: '2024-04-03',
// app: { head },
typescript: {
strict: false,
},
devServerHandlers: [],
vite: {
plugins: [svgLoader({ svgo: false })],
define: {
__DEV__: !IS_PRODUCTION,
global: 'window',
},
},
runtimeConfig,
sourcemap,
modules,
css,
tailwindcss,
ignore: ['playwright/**/*.spec.*', 'playwright-report/*', '.idea/*'],
graphql,
experimental: {
// externalVue: false,
defaults: {
nuxtLink: {
trailingSlash: 'append',
activeClass: 'nuxt-link-active',
exactActiveClass: 'nuxt-link-exact-active',
},
},
},
}

export default defineNuxtConfig(config)
Want results from more Discord servers?
Add your server