medusajs / gatsby-starter-medusa

A production-ready Gatsby starter for Medusa
MIT License
80 stars 51 forks source link

Medusa storefront chrashes after starting it #19

Closed nfuhs closed 2 years ago

nfuhs commented 2 years ago

If I start the medusastorefront with medusa-develop my Medusa Store chrashes:

`noby@Mac-mini ~/react/my-medusa-storefront$ medusa develop medusa develop

Start development server. Watches file and rebuilds when something changes

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, --host Set host. Defaults to localhost [string] [default: "localhost"] -p, --port Set port. Defaults to 9000 [string] [default: "9000"] -h, --help Show help [boolean] -v, --version Show the version of the Medusa CLI and the Medusa package in the current project [boolean] /bin/sh: /Users/noby/react/my-medusa-storefront/node_modules/.bin/babel: No such file or directory Error: Command failed: /Users/noby/react/my-medusa-storefront/node_modules/.bin/babel src -d dist at checkExecSyncError (node:child_process:828:11) at execSync (node:child_process:899:15) at /Users/noby/react/my-medusa-storefront/node_modules/@medusajs/medusa/dist/commands/develop.js:82:42 at step (/Users/noby/react/my-medusa-storefront/node_modules/@medusajs/medusa/dist/commands/develop.js:33:23) at Object.next (/Users/noby/react/my-medusa-storefront/node_modules/@medusajs/medusa/dist/commands/develop.js:14:53) at /Users/noby/react/my-medusa-storefront/node_modules/@medusajs/medusa/dist/commands/develop.js:8:71 at new Promise () at __awaiter (/Users/noby/react/my-medusa-storefront/node_modules/@medusajs/medusa/dist/commands/develop.js:4:12) at default_1 (/Users/noby/react/my-medusa-storefront/node_modules/@medusajs/medusa/dist/commands/develop.js:74:12) { status: 127, signal: null, output: [ null, null, null ], pid: 1754, stdout: null, stderr: null }`

I'm using Node 16.15 on an old Mac mini from 2009 maybe there is a short fix to this issue?

Best, Norbert

kasperkristensen commented 2 years ago

Hi @nfuhs, you should not use medusa develop for starting your storefront. Just run yarn or npm run. The medusa develop command is used to start up your Medusa server, and should be called from the directory of your server 😄