Open salieri opened 3 years ago
Workaround if you don't care about having chromium with Puppeteer when you prepare your deployment package:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 rush update --full --purge --recheck
Being affected by this, nothing to do with puppeteer, our project just underwent a very successful refactor (all tests passing in multiple packages/apps) that requires the usage of symlinks. But now our CI fails when deploying, in the Copying folders...
stage.
Is there no way to ignore or bypass this check?
I have recently started seeing this same behavior in my Rush repo as well. I'm not sure what changed in our repo or environment but I've traced this back to a change in node-gyp
(see https://github.com/nodejs/node-gyp/issues/2713) which intentionally creates a symlink to python
on the host machine.
It looks like there is a fix that has not yet landed (https://github.com/nodejs/node-gyp/pull/2721) but my solution to this particular problem is simple. I've added a postRushInstall
hook that finds and removes these dangling symlinks:
"postRushInstall": [
// This is needed to remove node_gyp_bins which contains symlinks outside the root
// @see https://github.com/nodejs/node-gyp/issues/2713
// @see https://github.com/nodejs/node-gyp/pull/2721
"find ./common -name node_gyp_bins -type d -exec rm -r '{}' \\;"
],
I just encountered this too. My guess is that there's a bug with the folder copy where it doesn't properly handle paths with spaces in them
Summary
Some packages, such as Puppeteer, automatically create symbolic links inside
node_modules
.rush deploy
seems to fail when it encounters such a symlink.Repro steps
Example at: https://github.com/salieri/rush-issue-with-symlink-and-deploy
This may be MacOS only issue, as I didn't notice it on a Linux VM.
rush update
rush deploy --overwrite -p test
Expected result: Deploy command should complete successfully
Actual result:
Details
The issue is caused by SymlinkAnalyzer.ts expecting nothing but 'real' (non-symlink) directories in the path.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?