Skip to content

Commit fb32abc

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 3e26084 commit fb32abc

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
@@ -23,15 +23,23 @@ requirements:
2323
turbo.json: turbo.site.json
2424
cp $< $@
2525

26+
# NPM doesn't bin-link workspace packages during install, so it must be done manually.
27+
bin-link:
28+
[ -f packages/frontend-base/package.json ] && npm rebuild --ignore-scripts @openedx/frontend-base || true
29+
2630
build-packages: turbo.json
2731
$(TURBO) run build; rm -f turbo.json
32+
$(MAKE) bin-link
2833

2934
clean-packages: turbo.json
3035
$(TURBO) run clean; rm -f turbo.json
3136

3237
dev-packages: turbo.json
3338
$(TURBO) run watch:build dev:site; rm -f turbo.json
3439

40+
dev-site: bin-link
41+
npm run dev
42+
3543
clean:
3644
rm -rf dist
3745

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"clean": "make clean",
3333
"clean:packages": "make clean-packages",
3434
"dev": "PORT=1999 PUBLIC_PATH=/authn openedx dev",
35-
"dev:site": "npm run dev",
35+
"dev:site": "make dev-site",
3636
"dev:packages": "make dev-packages",
3737
"i18n_extract": "openedx formatjs extract",
3838
"lint": "openedx lint .",

0 commit comments

Comments
 (0)