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]: Yarn Build Fails #10233

Closed
islam56naser opened this issue Nov 22, 2024 · 4 comments · Fixed by #10236
Closed

[Bug]: Yarn Build Fails #10233

islam56naser opened this issue Nov 22, 2024 · 4 comments · Fixed by #10236

Comments

@islam56naser
Copy link

Package.json file

{
  "name": "root",
  "private": true,
  "workspaces": {
    "packages": [
      "packages/medusa",
      "packages/medusa-test-utils",
      "packages/modules/*",
      "packages/modules/providers/*",
      "packages/core/*",
      "packages/framework/*",
      "packages/cli/*",
      "packages/cli/oas/*",
      "packages/*",
      "packages/admin/*",
      "packages/design-system/*",
      "packages/generated/*",
      "integration-tests/**/*"
    ]
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^6.19.0",
    "@typescript-eslint/parser": "^6.19.0",
    "axios": "^0.21.4",
    "axios-mock-adapter": "^1.19.0",
    "cross-env": "^7.0.3",
    "eslint": "^8.23.0",
    "eslint-config-google": "^0.14.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.31.11",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.4.5",
    "eslint-plugin-storybook": "^0.6.12",
    "eslint-plugin-unused-imports": "^2.0.0",
    "express": "^4.17.1",
    "get-port": "^5.1.1",
    "glob": "^11.0.0",
    "import-from": "^3.0.0",
    "jest": "^29.7.0",
    "lint-staged": "^11.2.6",
    "microbundle": "^0.13.3",
    "pg-god": "^1.0.12",
    "prettier": "^2.7.1",
    "prettier-plugin-tailwindcss": "^0.2.3",
    "resolve-cwd": "^3.0.0",
    "ts-jest": "^29.1.1",
    "ts-node": "^10.9.1",
    "turbo": "^1.6.3"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": "yarn run lint",
    "*.{md,yaml,yml}": "prettier --write"
  },
  "scripts": {
    "build": "turbo run build --concurrency=50% --no-daemon",
    "lint": "eslint --ignore-path .eslintignore --ext .js,.ts,.tsx .",
    "lint:path": "eslint --ignore-path .eslintignore --ext .js,.ts,.tsx",
    "prettier": "prettier",
    "jest": "jest",
    "test": "turbo run test --concurrency=50% --no-daemon --no-cache --force",
    "test:chunk": "./scripts/run-workspace-unit-tests-in-chunks.sh",
    "test:integration:packages": "turbo run test:integration --concurrency=1 --no-daemon --no-cache --force --filter='./packages/*' --filter='./packages/core/*' --filter='./packages/cli/*' --filter='./packages/modules/*' --filter='./packages/modules/providers/*'",
    "test:integration:api": "turbo run test:integration:chunk --concurrency=50% --no-daemon --no-cache --force --filter=integration-tests-api",
    "test:integration:http": "turbo run test:integration:chunk --concurrency=50% --no-daemon --no-cache --force --filter=integration-tests-http",
    "test:integration:modules": "turbo run test:integration:chunk --concurrency=50% --no-daemon --no-cache --force --filter=integration-tests-modules",
    "openapi:generate": "yarn ./packages/cli/oas/oas-github-ci run ci --with-full-file",
    "medusa-oas": "yarn ./packages/cli/oas/medusa-oas-cli run medusa-oas",
    "release:snapshot": "changeset publish --no-git-tags --snapshot --tag snapshot",
    "release:next": "chgstangeset publish --no-git-tags --snapshot --tag next",
    "version:next": "changeset version --snapshot next",
    "release": "changeset publish",
    "version": "changeset version && yarn install --no-immutable"
  },
  "dependencies": {
    "@changesets/changelog-github": "^0.4.8",
    "@changesets/cli": "^2.26.0",
    "global": "^4.4.0",
    "import-from": "^3.0.0"
  },
  "packageManager": "[email protected]",
  "resolutions": {
    "@redocly/cli/react": "^17.0.1",
    "@redocly/cli/react-dom": "^17.0.1",
    "pg": "8.11.3"
  }
}

Node.js version

v20.18.0

Database and its version

Postgresql 15

Operating system name and version

WSL ubuntu 20.04

Browser name

No response

What happended?

Steps To Reproduce

  1. git clone https://github.com/islam56naser/medusa
  2. cd medusa
  3. git checkout v2.0.4
  4. yarn install
  5. yarn build
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/validators/isValidIdentifier.js:7:41:
@medusajs/admin-vite-plugin:build:       7 │ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@medusajs/admin-vite-plugin:build:         ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-validator-identifier" here because
@medusajs/admin-vite-plugin:build:   it's not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-validator-identifier" as external to exclude it from the
@medusajs/admin-vite-plugin:build:   bundle, which will remove this error and leave the unresolved path in the bundle. You can also
@medusajs/admin-vite-plugin:build:   surround this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "to-fast-properties"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/definitions/index.js:73:32:
@medusajs/admin-vite-plugin:build:       73 │ var _toFastProperties = require("to-fast-properties");
@medusajs/admin-vite-plugin:build:          ╵                                 ~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "to-fast-properties" here because it's not listed
@medusajs/admin-vite-plugin:build:   as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "to-fast-properties" as external to exclude it from the bundle, which will
@medusajs/admin-vite-plugin:build:   remove this error and leave the unresolved path in the bundle. You can also surround this
@medusajs/admin-vite-plugin:build:   "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/converters/toIdentifier.js:8:41:
@medusajs/admin-vite-plugin:build:       8 │ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@medusajs/admin-vite-plugin:build:         ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-validator-identifier" here because
@medusajs/admin-vite-plugin:build:   it's not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-validator-identifier" as external to exclude it from the
@medusajs/admin-vite-plugin:build:   bundle, which will remove this error and leave the unresolved path in the bundle. You can also
@medusajs/admin-vite-plugin:build:   surround this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "to-fast-properties"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/definitions/index.js:73:32:
@medusajs/admin-vite-plugin:build:       73 │ var _toFastProperties = require("to-fast-properties");
@medusajs/admin-vite-plugin:build:          ╵                                 ~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "to-fast-properties" here because it's not listed
@medusajs/admin-vite-plugin:build:   as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "to-fast-properties" as external to exclude it from the bundle, which will
@medusajs/admin-vite-plugin:build:   remove this error and leave the unresolved path in the bundle. You can also surround this
@medusajs/admin-vite-plugin:build:   "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/validators/isValidIdentifier.js:7:41:
@medusajs/admin-vite-plugin:build:       7 │ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@medusajs/admin-vite-plugin:build:         ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-validator-identifier" here because
@medusajs/admin-vite-plugin:build:   it's not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-validator-identifier" as external to exclude it from the
@medusajs/admin-vite-plugin:build:   bundle, which will remove this error and leave the unresolved path in the bundle. You can also
@medusajs/admin-vite-plugin:build:   surround this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/converters/toIdentifier.js:8:41:
@medusajs/admin-vite-plugin:build:       8 │ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@medusajs/admin-vite-plugin:build:         ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-validator-identifier" here because
@medusajs/admin-vite-plugin:build:   it's not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-validator-identifier" as external to exclude it from the
@medusajs/admin-vite-plugin:build:   bundle, which will remove this error and leave the unresolved path in the bundle. You can also
@medusajs/admin-vite-plugin:build:   surround this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/definitions/core.js:9:41:
@medusajs/admin-vite-plugin:build:       9 │ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@medusajs/admin-vite-plugin:build:         ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-validator-identifier" here because
@medusajs/admin-vite-plugin:build:   it's not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-validator-identifier" as external to exclude it from the
@medusajs/admin-vite-plugin:build:   bundle, which will remove this error and leave the unresolved path in the bundle. You can also
@medusajs/admin-vite-plugin:build:   surround this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-string-parser"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/definitions/core.js:10:34:
@medusajs/admin-vite-plugin:build:       10 │ var _helperStringParser = require("@babel/helper-string-parser");
@medusajs/admin-vite-plugin:build:          ╵                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-string-parser" here because it's
@medusajs/admin-vite-plugin:build:   not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-string-parser" as external to exclude it from the bundle,
@medusajs/admin-vite-plugin:build:   which will remove this error and leave the unresolved path in the bundle. You can also surround
@medusajs/admin-vite-plugin:build:   this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/definitions/core.js:9:41:
@medusajs/admin-vite-plugin:build:       9 │ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@medusajs/admin-vite-plugin:build:         ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-validator-identifier" here because
@medusajs/admin-vite-plugin:build:   it's not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-validator-identifier" as external to exclude it from the
@medusajs/admin-vite-plugin:build:   bundle, which will remove this error and leave the unresolved path in the bundle. You can also
@medusajs/admin-vite-plugin:build:   surround this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ✘ [ERROR] Could not resolve "@babel/helper-string-parser"
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../node_modules/@babel/types/lib/definitions/core.js:10:34:
@medusajs/admin-vite-plugin:build:       10 │ var _helperStringParser = require("@babel/helper-string-parser");
@medusajs/admin-vite-plugin:build:          ╵                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   The Yarn Plug'n'Play manifest forbids importing "@babel/helper-string-parser" here because it's
@medusajs/admin-vite-plugin:build:   not listed as a dependency of this package:
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:     ../../../../.pnp.cjs:37:31:
@medusajs/admin-vite-plugin:build:       37 │         "packageDependencies": [\
@medusajs/admin-vite-plugin:build:          ╵                                ~~
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build:   You can mark the path "@babel/helper-string-parser" as external to exclude it from the bundle,
@medusajs/admin-vite-plugin:build:   which will remove this error and leave the unresolved path in the bundle. You can also surround
@medusajs/admin-vite-plugin:build:   this "require" call with a try/catch block to handle this failure at run-time instead of
@medusajs/admin-vite-plugin:build:   bundle-time.
@medusajs/admin-vite-plugin:build:
@medusajs/admin-vite-plugin:build: ESM Build failed
@medusajs/admin-vite-plugin:build: Error: Build failed with 5 errors:
@medusajs/admin-vite-plugin:build: ../../../node_modules/@babel/types/lib/converters/toIdentifier.js:8:41: ERROR: Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build: ../../../node_modules/@babel/types/lib/definitions/core.js:9:41: ERROR: Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build: ../../../node_modules/@babel/types/lib/definitions/core.js:10:34: ERROR: Could not resolve "@babel/helper-string-parser"
@medusajs/admin-vite-plugin:build: ../../../node_modules/@babel/types/lib/definitions/index.js:73:32: ERROR: Could not resolve "to-fast-properties"
@medusajs/admin-vite-plugin:build: ../../../node_modules/@babel/types/lib/validators/isValidIdentifier.js:7:41: ERROR: Could not resolve "@babel/helper-validator-identifier"
@medusajs/admin-vite-plugin:build:     at failureErrorWithLog (/home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:1651:15)
@medusajs/admin-vite-plugin:build:     at /home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:1059:25
@medusajs/admin-vite-plugin:build:     at runOnEndCallbacks (/home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:1486:45)
@medusajs/admin-vite-plugin:build:     at buildResponseToResult (/home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:1057:7)
@medusajs/admin-vite-plugin:build:     at /home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:1086:16
@medusajs/admin-vite-plugin:build:     at responseCallbacks.<computed> (/home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:704:9)
@medusajs/admin-vite-plugin:build:     at handleIncomingPacket (/home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:764:9)
@medusajs/admin-vite-plugin:build:     at Socket.readFromStdout (/home/ubuntu/medusa/packages/admin/admin-vite-plugin/node_modules/esbuild/lib/main.js:680:7)
@medusajs/admin-vite-plugin:build:     at Socket.emit (node:events:519:28)
@medusajs/admin-vite-plugin:build:     at addChunk (node:internal/streams/readable:559:12)
@medusajs/admin-vite-plugin:build: CJS Build failed
@medusajs/admin-sdk:build: DTS Build start
@medusajs/admin-vite-plugin:build: DTS Build start
@medusajs/icons:build:
@medusajs/icons:build: src/components/index.ts → dist/umd/medusa-icons.min.js...
create-medusa-app:build:
@medusajs/js-sdk:build: cache miss, executing c068d520e22bbe9a
@medusajs/ui-preset:build: DTS ⚡️ Build success in 3982ms
@medusajs/ui-preset:build: DTS dist/index.d.ts  12.00 B
@medusajs/ui-preset:build: DTS dist/index.d.mts 12.00 B
@medusajs/admin-sdk:build: DTS ⚡️ Build success in 3951ms
@medusajs/admin-sdk:build: DTS dist/index.d.ts  1.06 KB
@medusajs/admin-sdk:build: DTS dist/index.d.mts 1.06 KB
@medusajs/admin-vite-plugin:build: DTS ⚡️ Build success in 4301ms
@medusajs/admin-vite-plugin:build: DTS dist/index.d.ts  283.00 B
@medusajs/admin-vite-plugin:build: DTS dist/index.d.mts 283.00 B
@medusajs/admin-vite-plugin:build: ERROR: command finished with error: command (/home/ubuntu/medusa/packages/admin/admin-vite-plugin) /tmp/xfs-2915a4c5/yarn run build exited (1)
@medusajs/js-sdk:build:
@medusajs/utils:build:
@medusajs/admin-vite-plugin#build: command (/home/ubuntu/medusa/packages/admin/admin-vite-plugin) /tmp/xfs-2915a4c5/yarn run build exited (1)

 Tasks:    8 successful, 12 total
Cached:    0 cached, 12 total
  Time:    15.02s
Failed:    @medusajs/admin-vite-plugin#build

 ERROR  run failed: command  exited (1)

Expected behavior

Build Succeeds

Actual behavior

Build Fails

Link to reproduction repo

https://github.com/islam56naser/medusa

@sradevski
Copy link
Member

@islam56naser I just tried building our develop branch and there are no issues. What version of yarn do you have?
Did you do some custom setup/changes that caused this?

@kasperkristensen
Copy link
Contributor

Hey @islam56naser, thanks for reporting the issue.

You seem to be ignoring the .yarnrc.yml file in the root of the project, and using Yarn PnP for node_modules. I have just opened this PR (#10236) to make the usage of @babel/types compatible with PnP. But you should find a way to ensure that Yarn respects the .yarnrc.yml as we don't test for PnP, as we use nodeLinker: node-modules, so you are likely to run into other issues when using it.

@sradevski
Copy link
Member

Closing the ticket as it is nothing actionable on our side.

@islam56naser
Copy link
Author

@kasperkristensen Thanks for the quick response. I'm not trying to ignore the .yarnrc.yml. All I did is try to build medusa locally. Also, I tried to force disable PnP using yarn config set nodeLinker node-modules but I still get the same error.

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