GET 500 / [nuxt] [request error] [unhandled] [500],Object prototype may only be an Object or null: undefined
After deploying using
npx nuxthub deploy --dotenv .env.production
500
This page is temporarily unavailable.
Logs:
GET 500 / [nuxt] [request error] [unhandled] [500],Object prototype may only be an Object or null: undefined
what does that mean. I am not able to find out the root cause of it.
The same website is up and running on my self hosted server.
can any one help
here is package.json
{
"name": "website",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@nuxt/image": "^1.8.1",
"@nuxt/ui": "^2.20.0",
"@nuxthub/core": "^0.8.17",
"@nuxtjs/google-fonts": "^3.2.0",
"@nuxtjs/robots": "^5.1.0",
"@nuxtjs/seo": "^2.0.2",
"@pinia/nuxt": "^0.9.0",
"@productdevbook/chatwoot": "^1.7.0",
"@vueform/slider": "^2.1.10",
"@vueuse/core": "^12.2.0",
"@vueuse/nuxt": "^12.2.0",
"firebase": "^10.14.1",
"firebase-admin": "^12.7.0",
"firebase-functions": "^5.1.1",
"idb": "^8.0.1",
"nuxt": "^3.14.1592",
"nuxt-icons": "^3.2.1",
"nuxt-rating": "^0.1.5",
"nuxt-security": "^2.1.5",
"nuxt-vuefire": "^1.0.5",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.2.0",
"razorpay": "^2.9.5",
"typescript": "^5.7.2",
"vue": "^3.5.13",
"vue-image-zoomer": "^2.4.3",
"vue-router": "^4.5.0",
"vue3-otp-input": "^0.5.21",
"zod": "^3.24.1"
},
"overrides": {
"vite": "5.4.11"
},
"devDependencies": {
"nuxi": "^3.17.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"rollup-plugin-visualizer": "^5.13.1",
"wrangler": "^3.107.3"
}
}
I tried debugging by setting below
sourcemap: {
server: true,
client: true
},
nitro: {
compressPublicAssets: false,
minify: false,
},
Still there is no error or logs coming result of npx nuxthub preview
│ wasm/index_bg-dd4dd8881e2df4e6.wasm │ compiled-wasm │ 2420.51 KiB │ ├─────────────────────────────────────────────────────────┼───────────────┼─────────────┤ │ Total (236 modules) │ │ 9798.95 KiB │ └─────────────────────────────────────────────────────────┴───────────────┴─────────────┘ ✨ Compiled Worker successfully ✨ Parsed 0 valid redirect rules. ✨ Parsed 6 valid header rules. Using vars defined in .dev.vars Your worker has access to the following bindings:
- Vars:
- GOOGLE_APPLICATION_CREDENTIALS: "(hidden)"
- NUXT_GOOGLE_APPLICATION_CREDENTIALS: "(hidden)"
- PORTAL_URL: "(hidden)"
- SEARCH_URL: "(hidden)"
- IMAGE_URL: "(hidden)"
- NUXT_HUB_PROJECT_KEY: "(hidden)" [wrangler:inf] Ready on http://localhost:8788 ⎔ Starting local server... GOOGLE_APPLICATION_CREDENTIALS: http://localhost:8087/ GOOGLE_APPLICATION_CREDENTIALS: http://localhost:8088/ GOOGLE_APPLICATION_CREDENTIALS: undefined... [wrangler:inf] GET / 500 Internal Server Error (53ms) [wrangler:inf] GET / 500 Internal Server Error (9ms) [wrangler:inf] GET / 500 Internal Server Error (8ms) [wrangler:inf] GET / 500 Internal Server Error (8ms) [wrangler:inf] GET / 500 Internal Server Error (22ms) [wrangler:inf] GET /favicon.ico 200 OK (15ms) [wrangler:inf] GET / 500 Internal Server Error (17ms) ╭─────────────────────────────────────────────────────────────────────────╮ │ [b] open a browser, [d] open devtools, [c] clear console, [x] to exit │ ╰─────────────────────────────────────────────────────────────────────────╯
export default defineNitroPlugin(() => {
const x = useRuntimeConfig()
console.log('GOOGLE_APPLICATION_CREDENTIALS:', x.portalURL);
console.log('GOOGLE_APPLICATION_CREDENTIALS:', x.searchURL);
console.log('GOOGLE_APPLICATION_CREDENTIALS:', process.env.GOOGLE_APPLICATION_CREDENTIALS?.slice(0, 50) + '...');
});
It's likely one of your dependencies isn't compatible with the Cloudflare runtime. Could you make a minimal reproduction to identify the dependency causing the issue please?