supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Cannot resolve module "./server/services" after running `pnpm install`

Open phillipmohr opened this issue 9 months ago • 1 comments

Hi, I'm getting this error when running pnpm install. It happens locally and on the server as well. Happens on the machine of my colleague as well.

I can't upgrade my nuxtjs/supabase version, because I'm encountering a new bug with >1.3.0 so I would like to stick to 1.2.2 if possible.

Any ideas why this is happening? It's happening out of the sudden. Never happened before.

[error] Cannot resolve module "./server/services" (from: /vercel/path0/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxtjs/supabase/dist/runtime/)
  at resolveModuleURL (node_modules/.pnpm/[email protected]/node_modules/exsolve/dist/index.mjs:1288:19)
  at resolveModulePath (node_modules/.pnpm/[email protected]/node_modules/exsolve/dist/index.mjs:1306:20)
  at resolveModule (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2236:10)
  at resolveRuntimeModule (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxtjs/supabase/dist/module.mjs:41:44)
  at node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxtjs/supabase/dist/module.mjs:83:47
  at node_modules/.pnpm/[email protected]/node_modules/hookable/dist/index.mjs:48:66
  at node_modules/.pnpm/[email protected]/node_modules/hookable/dist/index.mjs:48:56
  at async initNitro (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]__io_3xefgu4vul4vvbmoxd64gxccwq/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:4415:3)
  at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]__io_3xefgu4vul4vvbmoxd64gxccwq/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:5833:3)
  at async loadNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]__io_3xefgu4vul4vvbmoxd64gxccwq/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:5937:5)
  at async loadNuxt (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2713:19)
  at async Object.run (node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/cli/dist/chunks/prepare.mjs:31:18)
  at async runCommand (node_modules/.pnpm/[email protected]/node_modules/citty/dist/index.mjs:316:16)
  at async runCommand (node_modules/.pnpm/[email protected]/node_modules/citty/dist/index.mjs:307:11)
  at async runMain (node_modules/.pnpm/[email protected]/node_modules/citty/dist/index.mjs:445:7) 

Version

@nuxtjs/supabase: 1.2.2 nuxt: ^3.12.2

Reproduction Link

Steps to reproduce

pnpm i with this package.json

{
	"name": "nuxt-app",
	"private": true,
	"type": "module",
	"scripts": {
		"build": "nuxt build",
		"dev": "nuxt dev",
		"start": "nuxt start",
		"generate": "nuxt generate",
		"preview": "nuxt preview",
		"postinstall": "nuxt prepare"
	},
	"devDependencies": {
		"@nuxt/devtools": "2.0.0",
		"@nuxtjs/i18n": "^9.1.1",
		"@nuxtjs/ngrok": "^3.0.1",
		"@nuxtjs/tailwindcss": "^6.7.0",
		"@types/express": "^4.17.21",
		"@types/express-session": "^1.17.10",
		"@types/facebook-nodejs-business-sdk": "^18.0.0",
		"@types/fb": "^0.0.28",
		"@types/formidable": "^3.4.5",
		"@types/google.maps": "^3.55.10",
		"@types/lodash": "^4.14.200",
		"@types/node": "^18.17.3",
		"@types/papaparse": "^5.3.14",
		"@types/passport": "^1.0.16",
		"@types/passport-facebook": "^3.0.3",
		"@vueuse/core": "^10.9.0",
		"@vueuse/nuxt": "^10.9.0",
		"autoprefixer": "^10.4.14",
		"cypress": "^13.13.0",
		"nodemailer": "^6.9.14",
		"nuxt": "^3.12.2",
		"nuxt-cron": "^1.5.1",
		"nuxt-meta-pixel": "2.0.2",
		"nuxt-module-hotjar": "^1.2.6",
		"nuxt-nodemailer": "^1.1.2",
		"nuxt-svgo": "^3.4.0",
		"postcss": "^8.4.24",
		"postcss-loader": "^7.3.2",
		"sass": "^1.63.2",
		"sass-loader": "^13.3.1",
		"type-fest": "^4.5.0"
	},
	"dependencies": {
		"@fawmi/vue-google-maps": "0.9.72",
		"@formkit/addons": "^1.6.9",
		"@formkit/nuxt": "^1.6.9",
		"@formkit/pro": "^0.127.21",
		"@formkit/themes": "^1.6.9",
		"@headlessui/vue": "^1.7.16",
		"@heroicons/vue": "^2.0.18",
		"@intercom/messenger-js-sdk": "^0.0.11",
		"@nuxtjs/auth-next": "5.0.0-1667386184.dfbbb54",
		"@nuxtjs/supabase": "1.2.2",
		"@pinia/nuxt": "^0.5.1",
		"@stripe/stripe-js": "^2.4.0",
		"@supabase/supabase-js": "^2.39.0",
		"@tailwindcss/forms": "^0.5.6",
		"@vercel/functions": "^2.0.0",
		"@vue-hero-icons/solid": "^1.7.2",
		"@zxcvbn-ts/core": "^3.0.4",
		"@zxcvbn-ts/language-common": "^3.0.4",
		"@zxcvbn-ts/language-de": "^3.0.2",
		"@zxcvbn-ts/language-en": "^3.0.2",
		"@zxcvbn-ts/matcher-pwned": "^3.0.4",
		"currency.js": "^2.0.4",
		"defu": "^6.1.4",
		"dts-gen": "^0.10.1",
		"facebook-nodejs-business-sdk": "^21.0.5",
		"fb": "^2.0.0",
		"formidable": "^3.5.1",
		"html2canvas-pro": "^1.5.8",
		"i": "^0.3.7",
		"i18n-iso-countries": "^7.13.0",
		"lodash": "^4.17.21",
		"node-fetch": "^3.3.2",
		"npm": "^10.4.0",
		"nuxt-icon": "^0.4.1",
		"passport": "^0.7.0",
		"passport-facebook": "^3.0.0",
		"pinia": "^2.1.7",
		"stripe": "^17.7.0",
		"tailwindcss": "^3.2.0",
		"vue-recaptcha-v3": "^2.0.1"
	}
}

What is Expected?

Not throwing an error

What is actually happening?

Error thrown as mentioned above

phillipmohr avatar Mar 11 '25 07:03 phillipmohr

Same problem here. Did you find a way ?

JulienMaurice avatar Apr 04 '25 14:04 JulienMaurice

I have this problem too. I don't know where does it come from. :/

conglb avatar Jun 25 '25 14:06 conglb

HI i had the same problem i found out that the version of supabase is the problem so i just updated it currently im using supabase version = "@nuxtjs/supabase": "^1.6.0",

and everything is working fine

Alzubair98 avatar Jul 25 '25 16:07 Alzubair98