Skip to content

Commit 389139d

Browse files
arbrandesclaude
andcommitted
fix: bin-link frontend-base
npm skips bin-linking for workspace packages during install, so the openedx CLI isn't available in node_modules/.bin when needed. Work around this by linking when frontend-base is built. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9207b7b commit 389139d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,23 @@ requirements: ## install ci requirements
3939
turbo.json: turbo.site.json
4040
cp $< $@
4141

42+
# NPM doesn't bin-link workspace packages during install, so it must be done manually.
43+
bin-link:
44+
[ -f packages/frontend-base/package.json ] && npm rebuild --ignore-scripts @openedx/frontend-base || true
45+
4246
build-packages: turbo.json
4347
$(TURBO) run build; rm -f turbo.json
48+
$(MAKE) bin-link
4449

4550
clean-packages: turbo.json
4651
$(TURBO) run clean; rm -f turbo.json
4752

4853
dev-packages: turbo.json
4954
$(TURBO) run watch:build dev:site; rm -f turbo.json
5055

56+
dev-site: bin-link
57+
npm run dev
58+
5159
clean:
5260
rm -rf dist
5361

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"clean": "make clean",
3030
"clean:packages": "make clean-packages",
3131
"dev": "PORT=1996 PUBLIC_PATH=/learner-dashboard openedx dev",
32-
"dev:site": "npm run dev",
32+
"dev:site": "make dev-site",
3333
"dev:packages": "make dev-packages",
3434
"i18n_extract": "openedx formatjs extract",
3535
"lint": "openedx lint .",

0 commit comments

Comments
 (0)