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]: v2.0.6 An error occurred while preparing project: Error: Command failed: npx medusa db:migrate #10289

Closed
jzyds opened this issue Nov 26, 2024 · 27 comments

Comments

@jzyds
Copy link

jzyds commented Nov 26, 2024

Package.json file

{
  "name": "medusa-starter-default",
  "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": {
    "@medusajs/admin-sdk": "latest",
    "@medusajs/cli": "latest",
    "@medusajs/framework": "latest",
    "@medusajs/medusa": "latest",
    "@mikro-orm/core": "5.9.7",
    "@mikro-orm/knex": "5.9.7",
    "@mikro-orm/migrations": "5.9.7",
    "@mikro-orm/postgresql": "5.9.7",
    "awilix": "^8.0.1",
    "pg": "^8.13.0"
  },
  "devDependencies": {
    "@medusajs/test-utils": "latest",
    "@mikro-orm/cli": "5.9.7",
    "@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"
  },
  "engines": {
    "node": ">=20"
  }
}

Node.js version

v23.1.0

Database and its version

PostgreSQL 16

Operating system name and version

macos

Browser name

No response

What happended?

A error occurred while running npx medusa db:migrate
···
An error occurred while preparing project: Error: Command failed: npx medusa db:migrate
···
TypeError: Cannot set property path of # which has only a getter

Expected behavior

No error

Actual behavior

An error occurred

Link to reproduction repo

https://github.com/medusajs/medusa-starter-default

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

@jzyds can't seem to reproduce this. Can you provide a step by step instruction?

@riqwan riqwan self-assigned this Nov 26, 2024
@julianengel
Copy link

Hi, same thing is happening.


root@nutri-medusa:~/nutrified-com# npx medusa db:migrate
--------------- ERROR ---------------------
undefined
-------------------------------------------
Usage: medusa <command> [options]

Commands:
  medusa new [root] [starter]  Create a new Medusa project.
  medusa telemetry             Enable or disable collection of anonymous usage data.
  medusa seed                  Migrates and populates the database with the provided file.
  medusa migrations [action]   Manage migrations from the core and your own project
  medusa develop               Start development server. Watches file and rebuilds when something changes
  medusa start                 Start development server.
  medusa start-cluster         Start development server in cluster mode (beta).
  medusa user                  Create a user

Options:
  --verbose                Turn on verbose output                                                                                                                                           [boolean] [default: false]
  --no-color, --no-colors  Turn off the color in output                                                                                                                                     [boolean] [default: false]
  --json                   Turn on the JSON logger                                                                                                                                          [boolean] [default: false]
  -h, --help               Show help                                                                                                                                                                         [boolean]
  -v, --version            Show the version of the Medusa CLI and the Medusa package in the current project                                                                                                  [boolean]
info:    
info:    Unknown argument: db:migrate
root@nutri-medusa:~/nutrified-com# npx medusa db:migrate


@julianengel
Copy link

After upgrading medusa and medusa cli, this the above error comes up.

Are we meant to run it after starting medusa with npx medusa develop?

Copy link
Contributor

riqwan commented Nov 26, 2024

Can you share the results of ls -l node_modules/@medusajs/?

@julianengel
Copy link

root@nutri-medusa:~/nutrified-com# ls -l node_modules/@medusajs/
total 240
drwxr-xr-x 3 root root 4096 Nov 26 14:18 admin-bundler
drwxr-xr-x 3 root root 4096 Nov 21 07:00 admin-sdk
drwxr-xr-x 3 root root 4096 Nov 26 14:18 admin-shared
drwxr-xr-x 4 root root 4096 Nov 26 14:18 admin-vite-plugin
drwxr-xr-x 3 root root 4096 Nov 26 14:18 api-key
drwxr-xr-x 3 root root 4096 Nov 26 14:18 auth
drwxr-xr-x 3 root root 4096 Nov 26 14:18 auth-emailpass
drwxr-xr-x 3 root root 4096 Nov 26 14:18 auth-github
drwxr-xr-x 3 root root 4096 Nov 26 14:18 auth-google
drwxr-xr-x 3 root root 4096 Nov 26 14:18 cache-inmemory
drwxr-xr-x 3 root root 4096 Nov 26 14:18 cache-redis
drwxr-xr-x 3 root root 4096 Nov 26 14:18 cart
drwxr-xr-x 3 root root 4096 Nov 21 07:00 cli
drwxr-xr-x 3 root root 4096 Nov 26 14:18 core-flows
drwxr-xr-x 3 root root 4096 Nov 26 14:18 currency
drwxr-xr-x 3 root root 4096 Nov 26 14:18 customer
drwxr-xr-x 4 root root 4096 Nov 26 14:18 dashboard
drwxr-xr-x 3 root root 4096 Nov 26 14:18 event-bus-local
drwxr-xr-x 3 root root 4096 Nov 26 14:18 event-bus-redis
drwxr-xr-x 3 root root 4096 Nov 26 14:18 file
drwxr-xr-x 3 root root 4096 Nov 26 14:18 file-local
drwxr-xr-x 3 root root 4096 Nov 26 14:18 file-s3
drwxr-xr-x 3 root root 4096 Nov 21 07:00 framework
drwxr-xr-x 3 root root 4096 Nov 26 14:18 fulfillment
drwxr-xr-x 3 root root 4096 Nov 26 14:18 fulfillment-manual
drwxr-xr-x 3 root root 4096 Nov 26 14:18 icons
drwxr-xr-x 3 root root 4096 Nov 26 14:18 index
drwxr-xr-x 3 root root 4096 Nov 26 14:18 inventory
drwxr-xr-x 3 root root 4096 Nov 26 14:18 js-sdk
drwxr-xr-x 3 root root 4096 Nov 26 14:18 link-modules
drwxr-xr-x 3 root root 4096 Nov 26 14:18 locking
drwxr-xr-x 3 root root 4096 Nov 26 14:18 locking-postgres
drwxr-xr-x 3 root root 4096 Nov 26 14:18 locking-redis
drwxr-xr-x 3 root root 4096 Nov 26 14:18 medusa
drwxr-xr-x 4 root root 4096 Nov 26 14:18 medusa-cli
drwxr-xr-x 3 root root 4096 Nov 21 07:00 modules-sdk
drwxr-xr-x 3 root root 4096 Nov 26 14:18 notification
drwxr-xr-x 3 root root 4096 Nov 26 14:18 notification-local
drwxr-xr-x 3 root root 4096 Nov 26 14:18 notification-sendgrid
drwxr-xr-x 3 root root 4096 Nov 21 07:00 orchestration
drwxr-xr-x 3 root root 4096 Nov 26 14:18 order
drwxr-xr-x 3 root root 4096 Nov 26 14:18 payment
drwxr-xr-x 3 root root 4096 Nov 26 14:18 payment-stripe
drwxr-xr-x 3 root root 4096 Nov 26 14:18 pricing
drwxr-xr-x 3 root root 4096 Nov 26 14:18 product
drwxr-xr-x 3 root root 4096 Nov 26 14:18 promotion
drwxr-xr-x 3 root root 4096 Nov 26 14:18 region
drwxr-xr-x 3 root root 4096 Nov 26 14:18 sales-channel
drwxr-xr-x 3 root root 4096 Nov 26 14:18 stock-location
drwxr-xr-x 3 root root 4096 Nov 26 14:18 store
drwxr-xr-x 3 root root 4096 Nov 26 14:18 tax
drwxr-xr-x 4 root root 4096 Nov 26 14:18 telemetry
drwxr-xr-x 3 root root 4096 Nov 21 07:00 test-utils
drwxr-xr-x 3 root root 4096 Nov 26 14:18 types
drwxr-xr-x 3 root root 4096 Nov 21 07:00 ui
drwxr-xr-x 3 root root 4096 Nov 26 14:18 user
drwxr-xr-x 3 root root 4096 Nov 21 07:00 utils
drwxr-xr-x 3 root root 4096 Nov 26 14:18 workflow-engine-inmemory
drwxr-xr-x 3 root root 4096 Nov 26 14:18 workflow-engine-redis
drwxr-xr-x 3 root root 4096 Nov 21 07:00 workflows-sdk

Copy link
Contributor

riqwan commented Nov 26, 2024

You seem to have medusa-cli in there, the new one is just cli. Can you purge node_modules(rm -rf node_modules/*) and remove medusa-cli from package.json and try again?

@julianengel
Copy link

julianengel commented Nov 26, 2024

Yup, that resolved it. Thank you.

Steps:

Edited package.json :
to remove "@medusajs/medusa-cli": "^1.3.23",
but leaving "@medusajs/cli": "latest"
Ran rm -rf node_modules/* and npm i

Migration successful.

@julianengel
Copy link

If I can toss in my 2 cents, it would be a good idea to add this as note on V. 2.05 :)

@whitewhitehu
Copy link

my package.json file now @medusajs/cli is latest Still will appear this issue
Uploading 截屏2024-11-26 22.42.34.png…

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

@whitewhitehu follow these steps exactly by @julianengel, including removing node modules :)

#10289 (comment)

@whitewhitehu
Copy link

yes i del node modules dir and re install

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

Can you share the full error message you're getting? and the result of ls -l node_modules/@medusajs/

@whitewhitehu
Copy link

whitewhitehu commented Nov 26, 2024

[Removed by admin]

error msg :

/opt/homebrew/bin/yarn run dev
yarn run v1.22.22
$ medusa develop
info: Watching filesystem to reload dev server on file change
info: Skipping instrumentation registration. No register function found.
redisUrl not found. A fake redis instance will be used.
error: Error starting server
error: Cannot set property path of # which has only a getter
TypeError: Cannot set property path of # which has only a getter

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

Thats not correct @whitewhitehu, please run this exactly:

ls -l node_modules/@medusajs

@whitewhitehu
Copy link

i'm sorry ,Wrong directory

this node_modules/@medusajs file list

sh-3.2# ls -l node_modules/@medusajs
total 0
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 admin-bundler
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 admin-sdk
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 admin-shared
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 admin-vite-plugin
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 api-key
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 auth
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 auth-emailpass
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 auth-github
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 auth-google
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 cache-inmemory
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 cache-redis
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 cart
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 cli
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 core-flows
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 currency
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 customer
drwxr-xr-x 7 rock staff 224 Nov 26 22:47 dashboard
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 event-bus-local
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 event-bus-redis
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 file
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 file-local
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 file-s3
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 framework
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 fulfillment
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 fulfillment-manual
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 icons
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 index
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 inventory
drwxr-xr-x 4 rock staff 128 Nov 26 22:47 js-sdk
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 link-modules
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 locking
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 locking-postgres
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 locking-redis
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 medusa
drwxr-xr-x 4 rock staff 128 Nov 26 22:47 modules-sdk
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 notification
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 notification-local
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 notification-sendgrid
drwxr-xr-x 4 rock staff 128 Nov 26 22:47 orchestration
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 order
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 payment
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 payment-stripe
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 pricing
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 product
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 promotion
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 region
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 sales-channel
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 stock-location
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 store
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 tax
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 telemetry
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 test-utils
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 types
drwxr-xr-x 7 rock staff 224 Nov 26 22:47 ui
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 user
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 utils
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 workflow-engine-inmemory
drwxr-xr-x 6 rock staff 192 Nov 26 22:47 workflow-engine-redis
drwxr-xr-x 5 rock staff 160 Nov 26 22:47 workflows-sdk

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

Can you also share the package.json? @whitewhitehu

@whitewhitehu
Copy link

ok , this my package.json

{
"name": "medusa-starter-default",
"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": {
"@medusajs/admin-sdk": "latest",
"@medusajs/cli": "latest",
"@medusajs/framework": "latest",
"@medusajs/medusa": "latest",
"@mikro-orm/core": "5.9.7",
"@mikro-orm/knex": "5.9.7",
"@mikro-orm/migrations": "5.9.7",
"@mikro-orm/postgresql": "5.9.7",
"awilix": "^8.0.1",
"pg": "^8.13.0"
},
"devDependencies": {
"@medusajs/test-utils": "latest",
"@mikro-orm/cli": "5.9.7",
"@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"
},
"engines": {
"node": ">=20"
}
}

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

Can't seem to be able to reproduce this, can you open a reproduction repo for me to try?

@alexanderoskin
Copy link

alexanderoskin commented Nov 26, 2024

Same issue. Removing node modules didn't help. In package.json only @medusajs/cli, no @medusajs/medusa-cli.

TypeError: Cannot set property path of #<Dirent> which has only a getter
    at readRecursive (.../node_modules/@medusajs/utils/src/common/read-dir-recursive.ts:12:17)
    at async readDirRecursive (.../store/node_modules/@medusajs/utils/src/common/read-dir-recursive.ts:21:3)
    at async featureFlagsLoader (.../node_modules/@medusajs/framework/src/feature-flags/feature-flag-loader.ts:98:3)
    at async initializeContainer (.../node_modules/@medusajs/medusa/src/loaders/index.ts:122:3)
    at async migrate (.../node_modules/@medusajs/medusa/src/commands/db/migrate.ts:32:21)
    at async main (.../node_modules/@medusajs/medusa/src/commands/db/migrate.ts:77:22)

ls -l node_modules/@medusajs/

drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 admin-bundler
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 admin-sdk
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 admin-shared
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 admin-vite-plugin
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 api-key
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 auth
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 auth-emailpass
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 auth-github
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 auth-google
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 cache-inmemory
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 cache-redis
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 cart
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 cli
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 core-flows
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 currency
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 customer
drwxr-xr-x@ 7 alexander  staff  224 Nov 26 19:28 dashboard
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 event-bus-local
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 event-bus-redis
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 file
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 file-local
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 file-s3
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 framework
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 fulfillment
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 fulfillment-manual
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 icons
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 index
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 inventory
drwxr-xr-x@ 4 alexander  staff  128 Nov 26 19:28 js-sdk
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 link-modules
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 locking
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 locking-postgres
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 locking-redis
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 medusa
drwxr-xr-x@ 4 alexander  staff  128 Nov 26 19:28 modules-sdk
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 notification
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 notification-local
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 notification-sendgrid
drwxr-xr-x@ 4 alexander  staff  128 Nov 26 19:28 orchestration
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 order
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 payment
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 payment-stripe
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 pricing
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 product
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 promotion
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 region
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 sales-channel
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 stock-location
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 store
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 tax
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 telemetry
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 test-utils
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 types
drwxr-xr-x@ 7 alexander  staff  224 Nov 26 19:28 ui
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 user
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 utils
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 workflow-engine-inmemory
drwxr-xr-x@ 6 alexander  staff  192 Nov 26 19:28 workflow-engine-redis
drwxr-xr-x@ 5 alexander  staff  160 Nov 26 19:28 workflows-sdk

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

@alexanderoskin can you provide a reproducible repo?

@alexanderoskin
Copy link

@alexanderoskin can you provide a reproducible repo?

Run npx create-medusa-app@latest and on a migrations apply step will be these error.

An error occurred while preparing project: Error: Command failed: npx medusa db:migrate

TypeError: Cannot set property path of #<Dirent> which has only a getter
    at readRecursive (.../node_modules/@medusajs/utils/src/common/read-dir-recursive.ts:12:17)
    at async readDirRecursive (.../store/node_modules/@medusajs/utils/src/common/read-dir-recursive.ts:21:3)
    at async featureFlagsLoader (.../node_modules/@medusajs/framework/src/feature-flags/feature-flag-loader.ts:98:3)
    at async initializeContainer (.../node_modules/@medusajs/medusa/src/loaders/index.ts:122:3)
    at async migrate (.../node_modules/@medusajs/medusa/src/commands/db/migrate.ts:32:21)
    at async main (.../node_modules/@medusajs/medusa/src/commands/db/migrate.ts:77:22)

@alexanderoskin
Copy link

@riqwan issue was on Node v23.1.0. Related issue nodejs/node#55538

After upgrading to v23.3.0 issue is solved.

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

@alexanderoskin i see, I can't reproduce it. Can you share your npx / yarn , node and OS version?

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

I see, good catch! 🚀

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

@whitewhitehu can you give this a shot? If not, can you share which versions you're using?

@riqwan
Copy link
Contributor

riqwan commented Nov 26, 2024

Closing this for now, feel free to reopen if any of them don't work! :)

@riqwan riqwan closed this as completed Nov 26, 2024
@carlos-r-l-rodrigues
Copy link
Contributor

Fix: #10318

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

6 participants