fix(clickhouse): delete yarn.lock entirely to bypass broken @types/lucene alias

Yarn Berry caches resolution descriptors in yarn.lock in a multi-line
block format that sed line-deletion cannot properly handle. The
@types/hyperdx__lucene -> npm:@types/lucene alias persists across all
partial cleanup attempts. Deleting yarn.lock forces a fresh resolution
from package.json only, which is safe for a build-from-source install.
This commit is contained in:
CanbiZ (MickLesk)
2026-04-17 11:45:47 +02:00
parent e41e480466
commit 55372d21fc

View File

@@ -211,10 +211,8 @@ EOF
msg_info "Building HyperDX"
# Remove broken devDependency (@types/lucene does not exist on npm)
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('packages/app/package.json','utf8'));delete p.devDependencies['@types/hyperdx__lucene'];if(p.resolutions) delete p.resolutions['@types/hyperdx__lucene'];fs.writeFileSync('packages/app/package.json',JSON.stringify(p,null,2));"
sed -i '/@types\/hyperdx__lucene/d' yarn.lock
sed -i '/@types\/lucene/d' yarn.lock
rm -f .yarn/install-state.gz
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('packages/app/package.json','utf8'));delete p.devDependencies['@types/hyperdx__lucene'];fs.writeFileSync('packages/app/package.json',JSON.stringify(p,null,2));"
rm -f yarn.lock .yarn/install-state.gz
$STD yarn install
$STD yarn workspace @hyperdx/common-utils run build
$STD yarn workspace @hyperdx/api run build