medusajs / b2b-starter-medusa

Official Medusa B2B Starter template. Features common B2B ecommerce requirements and can be easily adapted and extended.
https://dub.sh/medusa-b2b-starter
MIT License
141 stars 42 forks source link

error: @medusajs/utils tried to access configurable-notifications.js #108

Closed TwinkleToesDev closed 1 day ago

TwinkleToesDev commented 4 days ago

Hi, I tried to set up the project locally, but I get this error when I try to make a seed.

I don't understand what the configurable-notifications.js

yarn run seed

info:    Executing script at ./src/scripts/seed.ts...
redisUrl not found. A fake redis instance will be used.
warn:    Local Event Bus installed. This is not recommended for production.
info:    Locking module: Using "in-memory" as default.
error:   Error running script
error:   @medusajs/utils tried to access configurable-notifications.js, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: configurable-notifications.js
Required by: @medusajs/utils@virtual:adeb06e11df7b3bd805a3e64ed16949e589a281ca04fba07c8621541e4ad2c6f6677d26ebd37efa6bd40c689f59f0ff457b6bf6104a4e579beb8b4643b03cf55#npm:2.0.4 (via /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/common/)

Require stack:
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/common/dynamic-import.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/common/index.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/auth/token.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/auth/index.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/index.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-cli-virtual-adeb06e11d/0/cache/@medusajs-cli-npm-2.0.4-2803893744-541e9eb17b.zip/node_modules/@medusajs/cli/dist/commands/new.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-cli-virtual-adeb06e11d/0/cache/@medusajs-cli-npm-2.0.4-2803893744-541e9eb17b.zip/node_modules/@medusajs/cli/dist/create-cli.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-cli-virtual-adeb06e11d/0/cache/@medusajs-cli-npm-2.0.4-2803893744-541e9eb17b.zip/node_modules/@medusajs/cli/dist/index.js
- /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-cli-virtual-adeb06e11d/0/cache/@medusajs-cli-npm-2.0.4-2803893744-541e9eb17b.zip/node_modules/@medusajs/cli/cli.js
Error: @medusajs/utils tried to access configurable-notifications.js, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: configurable-notifications.js
Required by: @medusajs/utils@virtual:adeb06e11df7b3bd805a3e64ed16949e589a281ca04fba07c8621541e4ad2c6f6677d26ebd37efa6bd40c689f59f0ff457b6bf6104a4e579beb8b4643b03cf55#npm:2.0.4 (via /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-utils-virtual-80f96c65e1/0/cache/@medusajs-utils-npm-2.0.4-87b109fdc8-cbc1e4e1b6.zip/node_modules/@medusajs/utils/dist/common/)
sradevski commented 4 days ago

@TwinkleToesDev I just cloned the repo, ran yarn install, npx medusa db:create, npx medusa db:migrate and then yarn run seed and it worked without a problem.

What version of yarn are you using?

TwinkleToesDev commented 4 days ago

@sradevski yarn 4.5.1

TwinkleToesDev commented 4 days ago

I get the error even when I run the migration. Apparently @medusajs/framework is missing, I don't understand why it's not there by default

yarn medusa db:migrate

Error: @medusajs/framework tried to access ioredis (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.

Required package: ioredis
Required by: @medusajs/framework@virtual:a5fee87f3c3594c5acca6ec31f6bab1bc61afaecd80153e4f2b329bc57f81708b48358b1e5d4ecf8598213963b7a93920b3564e39c2a68d82205530095876037#npm:2.0.4 (via /Users/twinkle/dev/b2b-vendors/b2b-starter-medusa/backend/.yarn/__virtual__/@medusajs-framework-virtual-b145f1552b/5/.yarn/berry/cache/@medusajs-framework-npm-2.0.4-979d105912-10.zip/node_modules/@medusajs/framework/dist/http/)
npx medusa db:create

npm error could not determine executable to run
npm error A complete log of this run can be found in: /Users/twinkle/.npm/_logs/2024-11-22T18_16_42_162Z-debug-0.log
TwinkleToesDev commented 4 days ago

I keep getting errors demanding to install some missing package. As a result, I installed a bunch of them https://d.pr/i/jZme1l . And as a result, I get the same error with notifications. I don't understand why this is so, help someone))

sradevski commented 3 days ago

@TwinkleToesDev try using yarn 1.22.x and see if you still get the same issues. I think it's just a yarn version mismatch issue

TwinkleToesDev commented 1 day ago

@sradevski Thanks, it works