medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24k stars 2.32k forks source link

Medusa v2 Docs: Issue in 1. Introduction - Medusa v2 Docs #7992

Open Saadchr opened 2 weeks ago

Saadchr commented 2 weeks ago

Preliminary Checks

Issue Summary

Following the docs, I encounter this error message :

error:   Error starting server
TypeError: getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `10` and Error.stackTraceLimit was: `10`
    at getCallerFilePath (/Users/saadchraibi/playgrounds/medusa/medusa_preview_2/my-medusa-store/node_modules/@medusajs/utils/src/common/get-caller-file-path.ts:7:11)
    at defineJoinerConfig (/Users/saadchraibi/playgrounds/medusa/medusa_preview_2/my-medusa-store/node_modules/@medusajs/utils/src/modules-sdk/joiner-config-builder.ts:76:41)
    at Module (/Users/saadchraibi/playgrounds/medusa/medusa_preview_2/my-medusa-store/node_modules/@medusajs/utils/src/modules-sdk/module.ts:36:49)
    at Object.<anonymous> (/Users/saadchraibi/playgrounds/medusa/medusa_preview_2/my-medusa-store/src/modules/hello/index.ts:4:22)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module.m._compile (/Users/saadchraibi/playgrounds/medusa/medusa_preview_2/my-medusa-store/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/saadchraibi/playgrounds/medusa/medusa_preview_2/my-medusa-store/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)

How can this issue be resolved?

  1. in medusa-config.js, add this line: Error.stackTraceLimit = 20 ath the beginning of the file
shahednasser commented 2 weeks ago

Hello, thanks for reporting this! This issue should be resolved now, can I get you to reinstall the dependencies with the following command and try again?

rm -rf node_modules
yarn # or install with your package manager