Open paynecodes opened 3 years ago
This is issue was originally tracked by https://github.com/microsoft/rushstack/issues/1982 which got closed when it was fixed for the other "linkCreation"
modes.
In https://github.com/microsoft/rushstack/issues/1982#issuecomment-653223979 I proposed a couple options for how to implement it. It was discussed further in Zulip chat #219557609 which suggests where to start, if someone wants to help by doing some experiments to figure out a reliable way to generate the scripts.
My sense is that the solution is not difficult, and the PR may be small. It's just not high enough priority for the maintainers to work on it. If someone from the community could help push this along, that would be much appreciated. (We can provide guidance and answer questions, just ask in #contributor-helpline.)
I misspoke about linkCreation: default
behaving correctly. For all node_modules/.bin
files, NODE_PATH
includes absolute paths on the host.
The docs for rush deploy
state the following:
The rush deploy command calculates this set of files and copies them to a target folder, which you can then upload to your server.
Without proper bin
link handling for linkCreation: default
and linkCreation: script
there is currently no way to use rush deploy
when bin
is needed.
This issue has been been affixed with the enhancement label. Shouldn't it be changed to bug? Semantics aside, how are teams currently using rush deploy
without this being fixed?
When deploying with linkCreation: default
all node_modules/bin
files set NODE_PATH
using absolute paths from the host, so you can't simply "upload to your server".
When deploying with linkCreation: script
there are no node_modules/bin
files at all, so you can't simply "upload to your server".
Is there any update on this issue? How can I build a Dockerfile from a built NextJS app without copying the next binary?
Summary
When using
rush deploy
withlinkCreation: default
, everything appears correct in thecommon/deploy
folder. Once I copy the contents of this folder into my docker container and execute the container, I get missing dependency errors. I assume docker is having trouble with the symlinks. After running rush deploy with"linkCreation": "script"
deploy.json option, I execute thecreate-script.js
file withnode create-scripts.js create
, but there is no node_modules/.bin folder anymore.Repro steps
Run
rush deploy
with"linkCreation": "script"
. See missing .bin folder where expectedStandard questions
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?