From e53004c70ce4da3c354f0ee2351c6cccfac19dd5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 11 Feb 2015 11:29:56 -0800 Subject: [PATCH] Clean out node_modules between builds This is a temporary workaround while a dedupe PR is in process Refs #5489 --- script/cibuild | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/script/cibuild b/script/cibuild index 863478ec1..678e2f123 100755 --- a/script/cibuild +++ b/script/cibuild @@ -30,7 +30,17 @@ function readEnvironmentVariables() { } } +function removeNodeModules() { + try { + require('fs-plus').removeSync(path.resolve(__dirname, '..', 'node_modules')); + } catch (error) { + console.error(error.message); + process.exit(1); + } +} + readEnvironmentVariables(); +removeNodeModules(); cp.safeExec.bind(global, 'npm install npm', {cwd: path.resolve(__dirname, '..', 'build')}, function() { cp.safeExec.bind(global, 'node script/bootstrap', function(error) { if (error)