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

[Bug]: plugin not loading in v2 #11729

Open
nyctonio opened this issue Mar 5, 2025 · 3 comments
Open

[Bug]: plugin not loading in v2 #11729

nyctonio opened this issue Mar 5, 2025 · 3 comments

Comments

@nyctonio
Copy link

nyctonio commented Mar 5, 2025

Package.json file

{
  "name": "backend",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "medusa"
  ],
  "scripts": {
    "build": "medusa build",
    "seed": "medusa exec ./src/scripts/seed.ts",
    "start": "medusa start",
    "dev": "medusa develop",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
  },
  "dependencies": {
    "medusa-brands": "file:.yalc/medusa-brands",
    "@medusajs/admin-bundler": "2.6.0",
    "@medusajs/admin-sdk": "2.6.0",
    "@medusajs/cli": "2.6.0",
    "@medusajs/framework": "2.6.0",
    "@medusajs/medusa": "2.6.0",
    "@mikro-orm/core": "6.4.3",
    "@mikro-orm/knex": "6.4.3",
    "@mikro-orm/migrations": "6.4.3",
    "@mikro-orm/postgresql": "6.4.3",
    "@repo/repo-types": "*",
    "@repo/ui": "*",
    "@repo/utils": "*",
    "awilix": "^8.0.1",
    "pg": "^8.13.0",
    "prettier": "^3.2.5",
    "turbo": "^2.3.0"
  },
  "devDependencies": {
    "@medusajs/test-utils": "2.6.0",
    "@mikro-orm/cli": "6.4.3",
    "@swc/core": "1.5.7",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.0.0",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.2.11",
    "yalc": "^1.0.0-pre.53"
  },
  "engines": {
    "node": ">=20"
  }
}

Node.js version

v22.0.0

Database and its version

16

Operating system name and version

MacOs

Browser name

No response

What happended?

Uncaught SyntaxError: The requested module '/app/@fs/Users/ritesh/Desktop/workspace/xyz/medusa/node_modules/qs/lib/index.js?v=52d21d5f' does not provide an export named 'stringify' (at client.js?v=52d21d5f:11:10)

Expected behavior

plugin should load

Actual behavior

not loading

Link to reproduction repo

NA

@specture48
Copy link
Contributor

I don't see plugin?
can u please share the medusa-config file

@Nicolas-Mousten
Copy link

Nicolas-Mousten commented Mar 5, 2025

i think maybe it is a .vite problem with the library qs that handles json methods like strinify.
#11248
at the bottom of the thread he showed a temporary solution until the problem gets fixed.

just change the class for his emoji to your qs.

@nyctonio
Copy link
Author

nyctonio commented Mar 5, 2025

i dont have any other package installed
i added just one package which is a package in my monorepo

{
  "name": "medusa-brands",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "exports": {
    "./package.json": "./package.json",
    "./workflows": "./.medusa/server/src/workflows/index.js",
    "./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
    "./modules/*": "./.medusa/server/src/modules/*/index.js",
    "./providers/*": "./.medusa/server/src/providers/*/index.js",
    "./*": "./.medusa/server/src/*.js"
  },
  "files": [
    ".medusa/server"
  ],
  "scripts": {
    "build": "medusa plugin:publish && yalc push",
    "dev": "medusa plugin:develop",
    "prepublishOnly": "medusa plugin:build"
  },
  "dependencies": {
    "@medusajs/admin-sdk": "2.6.0",
    "@medusajs/cli": "2.6.0",
    "@medusajs/framework": "2.6.0",
    "@medusajs/medusa": "2.6.0",
    "@mikro-orm/core": "6.4.3",
    "@mikro-orm/knex": "6.4.3",
    "@mikro-orm/migrations": "6.4.3",
    "@mikro-orm/postgresql": "6.4.3",
    "@repo/ui": "*",
    "awilix": "^8.0.1",
    "pg": "^8.13.0"
  },
  "devDependencies": {
    "@medusajs/test-utils": "2.6.0",
    "@mikro-orm/cli": "6.4.3",
    "@repo/utils": "*",
    "@swc/core": "1.5.7",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.0.0",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.2.11",
    "yalc": "^1.0.0-pre.53"
  },
  "peerDependencies": {
    "@medusajs/admin-sdk": "^2.6.0",
    "@medusajs/cli": "^2.6.0",
    "@medusajs/framework": "^2.6.0",
    "@medusajs/icons": "^2.6.0",
    "@medusajs/medusa": "^2.6.0",
    "@medusajs/test-utils": "^2.6.0",
    "@medusajs/ui": "^4.0.3",
    "@mikro-orm/cli": "^6.4.3",
    "@mikro-orm/core": "^6.4.3",
    "@mikro-orm/knex": "^6.4.3",
    "@mikro-orm/migrations": "^6.4.3",
    "@mikro-orm/postgresql": "^6.4.3",
    "awilix": "^8.0.1",
    "pg": "^8.13.0"
  },
  "engines": {
    "node": ">=20"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants