Denoder / nuxt-module-alternatives

Alternative modules to use while waiting for Nuxt 3 Compatibility
MIT License
144 stars 14 forks source link

Cannot start nuxt: Cannot read properties of undefined (reading 'push') #137

Open PavlosMac opened 1 year ago

PavlosMac commented 1 year ago

Environment

- Operating System: Darwin

Nuxt Config

"scripts": { "build": "nuxt build", "dev": "nuxt dev --port=3001", "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare", "prepare": "husky install", "lint": "eslint --ext .js,.vue --ignore-path .gitignore ." },

"devDependencies": { "@nuxt/postcss8": "^1.1.3", "@nuxtjs/eslint-config-typescript": "^11.0.0", "@nuxtjs/tailwindcss": "^5.3.3", "@types/howler": "^2.2.7", "@typescript-eslint/eslint-plugin": "^5.38.1", "@typescript-eslint/parser": "^5.38.1", "@vue/eslint-config-airbnb": "^7.0.0", "eslint": "^8.24.0", "eslint-config-airbnb-typescript": "^17.0.0", "eslint-import-resolver-typescript": "^3.5.1", "eslint-plugin-import": "^2.26.0", "eslint-plugin-nuxt": "^3.2.0", "husky": "^8.0.0", "i": "^0.3.7", "npm": "^8.19.2", "typescript": "^4.8.3", "vue-eslint-parser": "^9.1.0", "vue-tsc": "^0.40.13" }, "dependencies": { "@esbuild-plugins/node-globals-polyfill": "^0.1.1", "@esbuild-plugins/node-modules-polyfill": "^0.1.4", "@headlessui/vue": "^1.7.2", "@nuxtjs-alt/proxy": "^2.1.2", "@nuxtjs/i18n": "^8.0.0-beta.2", "@pinia/nuxt": "^0.4.2", "axios": "^0.27.2", "chart.js": "^3.9.1", "date-fns": "^2.29.3", "howler": "^2.2.3", "jwt-decode": "^3.1.2", "nuxt": "3.0.0", "vue-chartjs": "^4.1.2", "vue-slider-component": "^4.1.0-beta.6", "vue3-datepicker": "^0.3.4" }`

Reproduction

Install latest @nuxt-alt-proxy

Add to nuxt.config.ts

proxy: { enableProxy: true, proxies: { "^/recruit-api/.*": { target: "http://localhost:3000/recruit-api/v1", changeOrigin: true, rewrite: (path: string) => { if (path) { path?.replace(/^\/recruit-api/, "recruit-api/v111"); } } }, }, fetch: true }

Add to script file

await useFetch<IAssessment>( "${config.public.apiBase}/assignments/1/assessments/2", { initialCache: false, } );

Describe the bug

When running on 3.0.0-rc.11. I get this error:

Module @nuxtjs-alt/proxy is disabled due to incompatibility issues - [nuxt] Nuxt version ^3.0.0 is required but currently using 3.0.0-rc.11

If downgrading to 3.0.0 server errors with Cannot start nuxt: Cannot read properties of undefined (reading 'push')

Additional context

No response

Logs

No response

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.