primefaces / primevue-nuxt-module

MIT License
70 stars 11 forks source link

Conflict with @nuxtjs/strapi? Cannot find module './stringify' #37

Closed Zignature closed 7 months ago

Zignature commented 7 months ago

nuxt-primevue doesn't agree with @nuxt/strapi or vice versa.

I can run both packages fine separately, but if I run both packages at the same time the error occurs.

The same error occurs when running @nuxt/strapi with @invictus.codes/nuxt-vuetify. @nuxt/strapi has no problems when used with @nuxt/ui, but I'd really like to use PrimeVue.

I tried installing qs, but that didn;\'t change anything.

I posted at @nuxt/strapi too: https://github.com/nuxt-modules/strapi/issues/376

Error:

[nuxt] [request error] [unhandled] [500] Cannot find module './stringify'
Require stack:
- C:\webdev\- Vue Playground\- Nuxt\primevue\nuxt-primevue-strapi\qs
  at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
  at Module._load (node:internal/modules/cjs/loader:901:27)
  at Module.require (node:internal/modules/cjs/loader:1115:19)
  at require (node:internal/modules/helpers:130:18)
  at C:\webdev\- Vue Playground\- Nuxt\primevue\nuxt-primevue-strapi\qs:3:17
  at ViteNodeRunner.directRequest (/C:/webdev/-%20Vue%20Playground/-%20Nuxt/primevue/nuxt-primevue-strapi/node_modules/vite-node/dist/client.mjs:341:11)        
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async ViteNodeRunner.cachedRequest (/C:/webdev/-%20Vue%20Playground/-%20Nuxt/primevue/nuxt-primevue-strapi/node_modules/vite-node/dist/client.mjs:197:14)  
  at async ViteNodeRunner.dependencyRequest (/C:/webdev/-%20Vue%20Playground/-%20Nuxt/primevue/nuxt-primevue-strapi/node_modules/vite-node/dist/client.mjs:231:12)
  at async C:\webdev\- Vue Playground\- Nuxt\primevue\nuxt-primevue-strapi\node_modules\@nuxtjs\strapi\dist\runtime\composables\useStrapiClient.mjs:2:31

Versions:

node: v20.9.0 (Volta) npm: v10.2.4 (Volta) nuxt: v3.8.2 @nuxtjs/strapi: v1.10.1 nuxt-primevue: v0.2.2

mertsincan commented 7 months ago

Hi @Zignature,

I think this is not related to nuxt-primevue module. It does not use the stringify method in any of its code. When I look at the logs you sent, I see that there is a problem caused by the useStrapiClient.ts file. https://github.com/nuxt-modules/strapi/blob/dev/src/runtime/composables/useStrapiClient.ts

Best Regards,

Zignature commented 7 months ago

I agree, I checked. But it's very weird that the Strapi module works fine when the PrimeVue module is disabled... The qs module is there, I checked that too.

I guess I'll have to wait for an answer from the guys of Strapi. Thanks anyway 😄

mertsincan commented 7 months ago

Thanks a lot for the update! For now, closed ;)