Skip to content

Commit

Permalink
HACK: Try overrides for @parcel/watcher in package.json.
Browse files Browse the repository at this point in the history
Signed-off-by: Nashwan Azhari <[email protected]>
  • Loading branch information
aznashwan committed Jul 24, 2024
1 parent cf071ef commit bce5bcb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion v2.6.3/harbor-portal/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,19 @@ parts:
cd "$OUTDIR"
mkdir -p "$OUTDIR/dist"
npm install --unsafe-perm
# HACK(aznashwan): add override for watcher.
# https://github.com/parcel-bundler/watcher/issues/156#issuecomment-1762236540
PACKAGE_JSON="$OUTDIR/package.json"
python3 -c 'import sys, json; p=json.loads(sys.stdin.read()); p["overrides"] = {"@parcel/watcher": "2.1.0"}; print(json.dumps(p))' < "$PACKAGE_JSON" > "$PACKAGE_JSON.out"
mv "$PACKAGE_JSON.out" "$PACKAGE_JSON"
failed=`npm install --unsafe-perm || echo "FAILED"`
if echo "$failed" | grep "FAILED"; then
echo "NPM install failed, dumping all logs: " /root/.npm/_logs/*
cat /root/.npm/_logs/*
exit 1
fi
npm run generate-build-timestamp
node --max_old_space_size=2048 'node_modules/@angular/cli/bin/ng' build --configuration production
Expand Down

0 comments on commit bce5bcb

Please sign in to comment.