microsoft/rushstack

[rush] Rush deploy: symlink error with node-rdkafka dependency

tristangodfrey opened this issue · 2 comments

Context: running rush deploy leads to an error when using linkCreation: default.

When using linkCreation: default in deploy.json, I run into the following error specifically when a project has node-rdkafka as a dependency. Is this expected behaviour? I've noticed that if I use the "script" link creation, everything works fine. I'm trying to understand exactly what is causing the issue to occur.

0.083 The rush.json configuration requests Rush version 5.110.1
0.084 
0.084 Invoking "rush deploy"
0.084 ----------------------
0.084 
0.279 
0.281 
0.281 Rush Multi-Project Build Tool 5.110.1 - https://rushjs.io
0.281 Node.js version is 18.18.2 (LTS)
0.281 
0.283 
0.428 Starting "rush deploy"
0.428 
0.429 Loading deployment scenario: /source/common/config/rush/deploy.json
0.629 Extracting to target folder:  /source/common/deploy
0.629 Main project for extraction: @core/api
0.630 Analyzing project: @core/api
1.918 Analyzing project: @iot/portal
1.967 Analyzing project: @iot/portal-frontend
2.019 Analyzing project: @iot/kerlink-intake
2.095 Analyzing project: @iot/message-handler
2.115 Analyzing project: @iot/identity-service
2.284 Copying folders to target folder "/source/common/deploy"
7.633 Creating symlinks
7.800 
7.800 ERROR: File or folder already exists: /source/common/deploy/common/temp/node_modules/.pnpm/node-rdkafka@2.17.0/node_modules/node-rdkafka/build/deps/librdkafka++.so
7.800 EEXIST: file already exists, symlink 'librdkafka++.so.1' -> '/source/common/deploy/common/temp/node_modules/.pnpm/node-rdkafka@2.17.0/node_modules/node-rdkafka/build/deps/librdkafka++.so'
------

Info:

"rushVersion": "5.110.1",
"pnpmVersion": "8.7.6",

Node version: 18.
OS: macOS Sanoma (14.1.1)

If needed I can provide a small repo that reproduces the error. Note that the same issue occurs when using the node:18-alpine docker image.

@D4N14L - You refactored the package extractor recently. Any ideas here?

@octogonz - Any thoughts here?

Is there a postinstall script?