diff --git a/scripts/next-with-deps.sh b/scripts/next-with-deps.sh index 0f5f55f3a6b26..e320202ae4e08 100755 --- a/scripts/next-with-deps.sh +++ b/scripts/next-with-deps.sh @@ -29,8 +29,10 @@ done if [ ! -z $HAS_CONFLICTING_DEP ] || [ ! -d "$PROJECT_DIR/node_modules" ];then cd $PROJECT_DIR - yarn - rm -rf node_modules/{react,react-dom,styled-jsx,next} + yarn install + for dep in ${CONFLICTING_DEPS[@]};do + rm -rf node_modules/$dep + done fi cd $START_DIR