Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module './stringify' #416

Open
larseberhardt opened this issue Jun 4, 2024 · 5 comments
Open

Cannot find module './stringify' #416

larseberhardt opened this issue Jun 4, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@larseberhardt
Copy link

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/[email protected]/node_modules/vite-node/dist/client.mjs:362:11)  
  at ViteNodeRunner.directRequest (./node_modules/.pnpm/[email protected]/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/[email protected]/node_modules/vite-node/dist/client.mjs:189:14)  
  at async ViteNodeRunner.dependencyRequest (./node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:233:12)
@larseberhardt larseberhardt added the bug Something isn't working label Jun 4, 2024
@larseberhardt
Copy link
Author

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

@ozelotcode
Copy link

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

@crisvp
Copy link

crisvp commented Jun 28, 2024

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

@michaelreinhard1
Copy link

Same issue, using pnpm too

@LemmoTresto
Copy link

PNPM structures it's dependencies differently and doesn't allow dependencies to access each other (shamefully-hosting). This is an issue with how the 'qs' dependency is accessed.

Simple fixes are adding the qs dependency yourself or enabling shamefully-hosting, but end goal should be that this is fixed in the package itself.
My understanding is too limited to propose a fix but have a look at these issues for more information.

nuxt/nuxt#14146
nuxt-modules/i18n#2506

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants