···107107108108 # set offline mirror to yarn cache we created in previous steps
109109 yarn --offline config set yarn-offline-mirror "${yarnCache}"
110110+111111+ # set nodedir, so we can build binaries later
112112+ npm config set nodedir "${nodejs}"
110113 '';
111114112115 buildPhase = ''
···143146 # rebuild binaries, we use npm here, as yarn does not provide an alternative
144147 # that would not attempt to try to reinstall everything and break our
145148 # patching attempts
146146- npm --prefix ./remote rebuild --build-from-source --nodedir ${nodejs}
149149+ npm --prefix ./remote rebuild --build-from-source
147150148151 # run postinstall scripts after patching
149152 find . -path "*node_modules" -prune -o \