From 83819cb3f98ee2498eefb746616644f90378d97e Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 15 Jul 2019 13:53:18 -0500 Subject: [PATCH] Fix vscode-ripgrep rebuild error --- scripts/tasks.bash | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/tasks.bash b/scripts/tasks.bash index 407f2f6d..b4b593f6 100755 --- a/scripts/tasks.bash +++ b/scripts/tasks.bash @@ -98,9 +98,7 @@ function build-code-server() { # latest glibc. This means you must build on the target system. log "Installing remote dependencies" cd "${vscodeSourcePath}/remote" - # TODO: vscode-ripgrep errors saying node_modules doesn't exist. - # TODO: yarn --force should be the same but it doesn't fix it. - npm rebuild || true + yarn --production --force --build-from-source cp -r "${vscodeSourcePath}/remote/node_modules" "${codeServerBuildPath}" # Only keep the production dependencies. @@ -131,14 +129,11 @@ function build-vscode() { if [[ ! -d "${vscodeSourcePath}/node_modules" ]] ; then exit-if-ci log "Installing VS Code dependencies" - # Not entirely sure why but there seem to be problems with native modules - # so rebuild them. - # TODO: vscode-ripgrep errors saying node_modules doesn't exist. - # TODO: yarn --force should be the same but it'. - npm rebuild || true + yarn # Keep just what we need to keep the pre-built archive smaller. rm -rf "${vscodeSourcePath}/test" + rm -rf "${vscodeSourcePath}/remote/node_modules" # Will rebuild. else log "${vscodeSourceName}/node_modules already exists, skipping install" fi