R
Railway13h ago
Marko

yarn: command not found

Hi, i'm trying to run the B2B template from here (https://github.com/medusajs/b2b-starter-medusa), but i'm getting:
#10 [stage-0 6/10] RUN --mount=type=cache,id=s/7ccf675d-cbf9-4463-8502-b321da1cb537-/root/npm,target=/root/.npm yarn install
#10 [stage-0 6/10] RUN --mount=type=cache,id=s/7ccf675d-cbf9-4463-8502-b321da1cb537-/root/npm,target=/root/.npm yarn install
Package.json
{
"name": "my-monorepo",
"private": true,
"scripts": {
"setup": "yarn build-packages && yarn setup-db && yarn seed && yarn setup-user",
"dev": "turbo run dev",
"build-packages": "turbo run build --filter ./packages/*",
"setup-db": "cd ./apps/backend && npx medusa db:create && npx medusa db:migrate",
"seed": "turbo run seed --filter=medusa-starter-default",
"setup-user": "cd ./apps/backend && npx medusa user -e [email protected] -p supersecret -i admin",
"generate-env": "cp ./apps/backend/.env.template ./apps/backend/.env && cp ./apps/storefront/.env.template ./apps/storefront/.env",
"start": "turbo run start",
"lint": "turbo run lint"
},
"packageManager": "[email protected]",
"devDependencies": {
"turbo": "latest",
"typescript": "latest"
},
"workspaces": [
"apps/*",
"packages/*"
],
"engines": {
"node": ">=20",
"yarn": ">=1.22"
}
}
{
"name": "my-monorepo",
"private": true,
"scripts": {
"setup": "yarn build-packages && yarn setup-db && yarn seed && yarn setup-user",
"dev": "turbo run dev",
"build-packages": "turbo run build --filter ./packages/*",
"setup-db": "cd ./apps/backend && npx medusa db:create && npx medusa db:migrate",
"seed": "turbo run seed --filter=medusa-starter-default",
"setup-user": "cd ./apps/backend && npx medusa user -e [email protected] -p supersecret -i admin",
"generate-env": "cp ./apps/backend/.env.template ./apps/backend/.env && cp ./apps/storefront/.env.template ./apps/storefront/.env",
"start": "turbo run start",
"lint": "turbo run lint"
},
"packageManager": "[email protected]",
"devDependencies": {
"turbo": "latest",
"typescript": "latest"
},
"workspaces": [
"apps/*",
"packages/*"
],
"engines": {
"node": ">=20",
"yarn": ">=1.22"
}
}
And i even added railway.json file:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "yarn setup",
"nixpacksPlan": {
"phases": {
"install": {
"dependsOn": ["setup"],
"cmds": ["yarn install"]
}
}
}
},
"deploy": {
"startCommand": "yarn start",
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "yarn setup",
"nixpacksPlan": {
"phases": {
"install": {
"dependsOn": ["setup"],
"cmds": ["yarn install"]
}
}
}
},
"deploy": {
"startCommand": "yarn start",
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
Any ideas?
8 Replies
Percy
Percy13h ago
Project ID: 7ccf675d-cbf9-4463-8502-b321da1cb537
Brody
Brody13h ago
hello, thats not a project id
Marko
MarkoOP13h ago
Is this project id? 9858f6a2-8b94-41a0-8b1d-d60480e7ce45
Brody
Brody13h ago
yep
Marko
MarkoOP13h ago
I ejected the project to my repo https://github.com/kompraventa/b2b-starter-medusa
GitHub
GitHub - kompraventa/b2b-starter-medusa
Contribute to kompraventa/b2b-starter-medusa development by creating an account on GitHub.
Brody
Brody13h ago
did the template work before you ejected?
Marko
MarkoOP12h ago
Actually yes, i'll resolve the issue. I'm getting "could not find task start" but that's another issue
No description
Marko
MarkoOP12h ago
On forked/ejected untouched repo i'm getting now
#11 1.732 ➤ YN0000: │ "@algolia/cache-browser-local-storage@npm:4.24.0":

#11 1.732 ➤ YN0000: │ version: 4.24.0

#11 1.732 ➤ YN0000: │ resolution: "@algolia/cache-browser-local-storage@npm:4.24.0"

#11 1.732 ➤ YN0000: │

#11 1.732 ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.

#11 1.732 ➤ YN0000: └ Completed

#11 1.732 ➤ YN0000: · Failed with errors in 0s 761ms

#11 ERROR: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

-----

> [stage-0 7/9] RUN --mount=type=cache,id=s/2f921a83-4d00-453d-9890-f9671610ffd0-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile:
#11 1.732 ➤ YN0000: │ "@algolia/cache-browser-local-storage@npm:4.24.0":

#11 1.732 ➤ YN0000: │ version: 4.24.0

#11 1.732 ➤ YN0000: │ resolution: "@algolia/cache-browser-local-storage@npm:4.24.0"

#11 1.732 ➤ YN0000: │

#11 1.732 ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.

#11 1.732 ➤ YN0000: └ Completed

#11 1.732 ➤ YN0000: · Failed with errors in 0s 761ms

#11 ERROR: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

-----

> [stage-0 7/9] RUN --mount=type=cache,id=s/2f921a83-4d00-453d-9890-f9671610ffd0-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile:
This is too weird to me, i'll try something else
Want results from more Discord servers?
Add your server