nuxt-modules / strapi

Strapi Module for Nuxt
https://strapi.nuxtjs.org
MIT License
612 stars 75 forks source link

Cannot find module './stringify' #416

Open larseberhardt opened 4 weeks ago

larseberhardt commented 4 weeks ago

Version

"@nuxtjs/strapi": "^1.12.0", "nuxt": "^3.11.2", "vue": "^3.4.27", "vue-router": "^4.3.2"

Steps to reproduce

I have a clean Nuxt installation. Add the package how it's recommended and after the dev server breaks with the following error:

[nuxt] [request error] [unhandled] [500] Cannot find module './stringify'
Require stack:
- /Users/administrator/Documents/Projekte/testNuxt/qs
  at Function._resolveFilename (node:internal/modules/cjs/loader:1143:15)  
  at Function._load (node:internal/modules/cjs/loader:984:27)  
  at Module.require (node:internal/modules/cjs/loader:1231:19)  
  at require (node:internal/modules/helpers:179:18)  
  at ./qs:3:17  
  at ViteNodeRunner.runModule (./node_modules/.pnpm/vite-node@1.6.0/node_modules/vite-node/dist/client.mjs:362:11)  
  at ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@1.6.0/node_modules/vite-node/dist/client.mjs:346:16)  
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)  
  at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@1.6.0/node_modules/vite-node/dist/client.mjs:189:14)  
  at async ViteNodeRunner.dependencyRequest (./node_modules/.pnpm/vite-node@1.6.0/node_modules/vite-node/dist/client.mjs:233:12)
larseberhardt commented 4 weeks ago

I investigated that this only happen when u install the package with pnpm

ozelotcode commented 6 days ago

I have the same issue. Using pnpm too. Any solution?

crisvp commented 5 days ago

I haven't looked at the "why", but adding qs@5 to the nuxt project seems to work (pnpm add qs@^5.2.1).