Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fixed local pnpm server:setup with turbo
Damian Legawiec1129db84de05
diff --git a/scripts/server-setup.sh b/scripts/server-setup.shindex 07c582fe2d..6364352cef 100755--- a/scripts/server-setup.sh+++ b/scripts/server-setup.sh@@ -43,8 +43,23 @@ rm -rf "$SERVER_DIR/.git" "$SERVER_DIR/.gitignore"step "Writing server/.env (SPREE_PATH + SECRET_KEY_BASE)"printf 'SPREE_PATH=..\nSECRET_KEY_BASE=%s\n' "$(openssl rand -hex 64)" > "$SERVER_DIR/.env"-step "Building @spree/cli (so node ../packages/cli/dist/index.js works)"-pnpm --filter @spree/cli build+step "Building @spree/cli (so the spree CLI works in server/)"+# Through turbo, which builds workspace deps first (build dependsOn ^build) —+# a bare `pnpm --filter @spree/cli build` fails on a clean clone with+# `Could not resolve "@spree/admin-sdk"` because packages/admin-sdk/dist+# doesn't exist yet.+pnpm turbo build --filter=@spree/cli++# On a clean clone `pnpm install` runs before the CLI is ever built, and pnpm+# only links a workspace bin whose target file exists — so the `spree` shim+# is silently skipped, and a later `pnpm install` (even --force) does not+# recreate it. Link it ourselves now that the build exists; dist/index.js+# carries a node shebang and is executable, so a plain symlink works.+if [ ! -e "$ROOT/node_modules/.bin/spree" ]; then+ step "Linking the missing spree bin shim"+ mkdir -p "$ROOT/node_modules/.bin"+ ln -sf ../../packages/cli/dist/index.js "$ROOT/node_modules/.bin/spree"+fistep "Starting the edge stack"# Detached on purpose — `pnpm server:dev` runs the stack in the foreground