title: CI failed because of node-sass, on Ionic 4 and nodeV12
body: <p>I'm facing an issue in my developpement, I develop an app with ionic v4 and I had a continuous integration for test on Gitlab. Locally my test and build pass, but on the server-side for the ci it failed.
  First time, I had an error which was :</p>
  
  <pre><code>Module build failed (from ./node_modules/sass-loader/lib/loader.js):
  Error: Cannot find module 'node-sass'
  </code></pre>
  
  <p>After that made many change in my .gitlab-ci.yml like, </p>
  
  <ul>
  <li>npm rebuild node-sass</li>
  <li>npm rebuild node-sass --force</li>
  <li>npm run clean </li>
  <li>rm -rf node_modules and package-lock.json</li>
  <li>ionic repair</li>
  <li>npm uninstall node-sass and npm install node-sass (and with spécific version 12+)</li>
  </ul>
  
  <p>I tried in all order and failed, after more research I've see that the server have not same node and npm versions, So I updated my side to the same version locally :</p>
  
  <pre><code>C:\Users\Ludovic\Documents\gototalentMobile&gt;node -v
  v12.13.1
  
  C:\Users\Ludovic\Documents\gototalentMobile&gt;npm -v
  6.12.0
  </code></pre>
  
  <p>After that I alway have my ci which failed, what I see is that there is an ionic script (or angular) which is executed all time and install a node-sass version incompatible with node 12 :</p>
  
  <pre><code>&gt; node-sass@4.10.0 install /builds/hrit/gototalentMobile/node_modules/@angular-devkit/build-angular/node_modules/node-sass
  &gt; node scripts/install.js
  
  Downloading binary from https://github.com/sass/node-sass/releases/download/v4.10.0/linux-x64-72_binding.node
  Cannot download "https://github.com/sass/node-sass/releases/download/v4.10.0/linux-x64-72_binding.node": 
  
  HTTP error 404 Not Found
  </code></pre>
  
  <p>Problem here is that I don't know where is this script, I tried many things to install the node-sassV12+ in my dependencies, but it create always a dependency to V10 in my package-lock.json. I think the problem came from here, node-sass@10.0.0 will not work with NodeV12 but I don't know where change this.</p>
  
  <p>I let here all my informations : </p>
  
  <p>Ionic cordova </p>
  
  <pre><code>C:\Users\Ludovic\Documents\gototalentMobile&gt;ionic info
  
  Ionic:
  
     ionic (Ionic CLI)             : 4.4.0 (C:\Users\Ludovic\node_modules\ionic)
     Ionic Framework               : @ionic/angular 4.11.5
     @angular-devkit/build-angular : 0.12.4
     @angular-devkit/schematics    : 7.2.4
     @angular/cli                  : 7.2.4
     @ionic/angular-toolkit        : 1.4.1
  
  Cordova:
  
     cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
     Cordova Platforms     : android 7.1.1, ios 5.0.0
     Cordova Plugins       : not available
  
  System:
  
     NodeJS : v12.13.1 (C:\Program Files\nodejs\node.exe)
     npm    : 6.12.0
     OS     : Windows 7
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "talentmoovmobile",
    "version": "1.0.0",
    "author": "Ionic Framework",
    "homepage": "https://ionicframework.com/",
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e",
      "dev": "ionic cordova run android --device",
      "ci-staging-build": "ng build --configuration=staging",
      "staging": "ionic cordova run android --configuration=staging --device",
      "test-ci": "ng test --watch=false"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "^7.2.9",
      "@angular/cdk": "^7.3.4",
      "@angular/common": "^7.2.2",
      "@angular/core": "^7.2.2",
      "@angular/forms": "^7.2.2",
      "@angular/http": "^7.2.2",
      "@angular/material": "^7.3.4",
      "@angular/platform-browser": "^7.2.2",
      "@angular/platform-browser-dynamic": "^7.2.2",
      "@angular/router": "^7.2.2",
      "@fortawesome/angular-fontawesome": "^0.3.0",
      "@fortawesome/fontawesome-svg-core": "^1.2.17",
      "@fortawesome/free-regular-svg-icons": "^5.8.1",
      "@ionic-native/call-number": "^5.10.0",
      "@ionic-native/camera": "^5.2.0",
      "@ionic-native/core": "^5.0.0",
      "@ionic-native/email-composer": "^5.10.0",
      "@ionic-native/file": "^5.4.0",
      "@ionic-native/file-opener": "^5.10.0",
      "@ionic-native/local-notifications": "^5.3.0",
      "@ionic-native/screen-orientation": "^5.13.0",
      "@ionic-native/splash-screen": "^5.0.0",
      "@ionic-native/status-bar": "^5.0.0",
      "@ionic/angular": "^4.1.1",
      "@ionic/storage": "latest",
      "@stomp/ng2-stompjs": "^7.2.0",
      "@types/sockjs-client": "^1.1.1",
      "angular-calendar": "^0.27.1",
      "call-number": "1.0.1",
      "chart.js": "^2.8.0",
      "cordova": "^8.1.2",
      "cordova-android": "7.1.1",
      "cordova-ios": "5.0.0",
      "cordova-plugin-add-swift-support": "1.7.2",
      "cordova-plugin-badge": "0.8.8",
      "cordova-plugin-camera": "4.0.3",
      "cordova-plugin-chooser": "1.2.5",
      "cordova-plugin-device": "^2.0.2",
      "cordova-plugin-email-composer": "0.9.2",
      "cordova-plugin-file": "6.0.1",
      "cordova-plugin-file-opener2": "2.2.1",
      "cordova-plugin-filechooser": "1.2.0",
      "cordova-plugin-ionic-keyboard": "^2.1.3",
      "cordova-plugin-ionic-webview": "^3.1.2",
      "cordova-plugin-local-notification": "0.9.0-beta.2",
      "cordova-plugin-screen-orientation": "3.0.2",
      "cordova-plugin-splashscreen": "^5.0.2",
      "cordova-plugin-statusbar": "^2.4.2",
      "cordova-plugin-whitelist": "^1.3.3",
      "core-js": "^2.5.4",
      "date-fns": "^1.30.1",
      "ion2-calendar": "^3.0.0-rc.0",
      "ionic4-rating": "^1.0.9",
      "moment": "^2.24.0",
      "mx.ferreyra.callnumber": "0.0.2",
      "node-gyp": "^6.0.1",
      "node-sass": "^4.13.0",
      "rxjs": "~6.3.3",
      "rxjs-compat": "^6.4.0",
      "sockjs-client": "^1.3.0",
      "zone.js": "~0.8.29"
    },
    "devDependencies": {
      "@angular-devkit/architect": "~0.12.3",
      "@angular-devkit/build-angular": "~0.12.3",
      "@angular-devkit/core": "~7.2.3",
      "@angular-devkit/schematics": "~7.2.3",
      "@angular/cli": "~7.2.3",
      "@angular/compiler": "~7.2.2",
      "@angular/compiler-cli": "~7.2.2",
      "@angular/language-service": "~7.2.2",
      "@fortawesome/fontawesome-free": "^5.8.1",
      "@ionic/angular-toolkit": "~1.4.0",
      "@types/jasmine": "~2.8.8",
      "@types/jasminewd2": "~2.0.3",
      "@types/node": "~10.12.0",
      "codelyzer": "~4.5.0",
      "jasmine-core": "~2.99.1",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~3.1.4",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.1",
      "karma-jasmine": "~1.1.2",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.4.0",
      "ts-node": "~8.0.0",
      "tslint": "~5.12.0",
      "typescript": "~3.1.6"
    },
    "description": "An Ionic project",
    "cordova": {
      "plugins": {
        "cordova-plugin-whitelist": {},
        "cordova-plugin-statusbar": {},
        "cordova-plugin-device": {},
        "cordova-plugin-splashscreen": {},
        "cordova-plugin-ionic-webview": {
          "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
        },
        "cordova-plugin-ionic-keyboard": {},
        "cordova-plugin-camera": {},
        "cordova-plugin-filechooser": {},
        "cordova-plugin-chooser": {},
        "cordova-plugin-local-notification": {},
        "cordova-plugin-file": {},
        "cordova-plugin-email-composer": {
          "ANDROID_SUPPORT_V4_VERSION": "27.+"
        },
        "mx.ferreyra.callnumber": {},
        "cordova-plugin-file-opener2": {
          "ANDROID_SUPPORT_V4_VERSION": "27.+"
        },
        "cordova-plugin-screen-orientation": {},
        "call-number": {}
      },
      "platforms": [
        "ios",
        "android"
      ]
    }
  }
  </code></pre>
  
  <p>Actual .gitlab-ci.yml which failed too</p>
  
  <pre><code># https://gitlab.com/ci/lint
  # https://gitlab.com/ci/lint
  # This image is based from node and includes what we need to run tests with Chrome headless
  image: weboaks/node-karma-protractor-chrome:headless
  
  variables:
  
  stages:
    - test
    - build
  
  test:
    stage: test
    script:
      - npm install --unsafe-perm node-sass@4.13.0
      - npm cache clean --force
      - npm install --ignore-scripts
      - npm run test-ci
    tags:
      - pages
  
  build:
    stage: build
    script:
      - npm install --unsafe-perm node-sass@4.13.0
      - npm cache clean --force
      - npm install --ignore-scripts
      - npm run ci-staging-build
    tags:
      - pages
    dependencies:
      - test
  </code></pre>
  
  <p>config.xml</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="fr.hritconsulting.talentmoov" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name&gt;TalentMoov&lt;/name&gt;
      &lt;description&gt;From HR'IT Consulting Teams.&lt;/description&gt;
      &lt;author email="contact@hr-itconsulting.com" href="https://www.hr-itconsulting.com/"&gt;HR'IT Consulting WebSite&lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;preference name="ScrollEnabled" value="false" /&gt;
      &lt;preference name="android-minSdkVersion" value="19" /&gt;
      &lt;preference name="BackupWebStorage" value="none" /&gt;
      &lt;preference name="SplashMaintainAspectRatio" value="true" /&gt;
      &lt;preference name="FadeSplashScreenDuration" value="300" /&gt;
      &lt;preference name="SplashShowOnlyFirstTime" value="false" /&gt;
      &lt;preference name="SplashScreen" value="screen" /&gt;
      &lt;preference name="SplashScreenDelay" value="3000" /&gt;
      &lt;platform name="android"&gt;
          &lt;allow-intent href="market:*" /&gt;
          &lt;icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /&gt;
          &lt;icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /&gt;
          &lt;icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /&gt;
          &lt;icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /&gt;
          &lt;icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /&gt;
          &lt;icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /&gt;
          &lt;splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" /&gt;
          &lt;splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" /&gt;
          &lt;splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" /&gt;
          &lt;splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" /&gt;
          &lt;splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" /&gt;
          &lt;splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" /&gt;
          &lt;splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" /&gt;
          &lt;splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" /&gt;
          &lt;splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" /&gt;
          &lt;splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" /&gt;
          &lt;splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" /&gt;
          &lt;splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" /&gt;
      &lt;/platform&gt;
      &lt;platform name="ios"&gt;
          &lt;allow-intent href="itms:*" /&gt;
          &lt;allow-intent href="itms-apps:*" /&gt;
          &lt;icon height="57" src="resources/ios/icon/icon.png" width="57" /&gt;
          &lt;icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /&gt;
          &lt;icon height="40" src="resources/ios/icon/icon-40.png" width="40" /&gt;
          &lt;icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /&gt;
          &lt;icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /&gt;
          &lt;icon height="50" src="resources/ios/icon/icon-50.png" width="50" /&gt;
          &lt;icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /&gt;
          &lt;icon height="60" src="resources/ios/icon/icon-60.png" width="60" /&gt;
          &lt;icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /&gt;
          &lt;icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /&gt;
          &lt;icon height="72" src="resources/ios/icon/icon-72.png" width="72" /&gt;
          &lt;icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /&gt;
          &lt;icon height="76" src="resources/ios/icon/icon-76.png" width="76" /&gt;
          &lt;icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /&gt;
          &lt;icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /&gt;
          &lt;icon height="29" src="resources/ios/icon/icon-small.png" width="29" /&gt;
          &lt;icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" /&gt;
          &lt;icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" /&gt;
          &lt;icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /&gt;
          &lt;splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /&gt;
          &lt;splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /&gt;
          &lt;splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /&gt;
          &lt;splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /&gt;
          &lt;splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /&gt;
          &lt;splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /&gt;
          &lt;splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /&gt;
          &lt;splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /&gt;
          &lt;splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /&gt;
          &lt;splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /&gt;
          &lt;splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /&gt;
          &lt;splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /&gt;
          &lt;splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /&gt;
      &lt;/platform&gt;
      &lt;plugin name="cordova-plugin-whitelist" spec="1.3.3" /&gt;
      &lt;plugin name="cordova-plugin-statusbar" spec="2.4.2" /&gt;
      &lt;plugin name="cordova-plugin-device" spec="2.0.2" /&gt;
      &lt;plugin name="cordova-plugin-splashscreen" spec="5.0.2" /&gt;
      &lt;plugin name="cordova-plugin-ionic-webview" spec="^3.0.0" /&gt;
      &lt;plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" /&gt;
      &lt;plugin name="cordova-plugin-camera" spec="4.0.3" /&gt;
      &lt;plugin name="cordova-plugin-chooser" spec="1.2.5" /&gt;
      &lt;plugin name="cordova-plugin-filechooser" spec="1.2.0" /&gt;
      &lt;plugin name="cordova-plugin-local-notification" spec="0.9.0-beta.2" /&gt;
      &lt;plugin name="cordova-plugin-file" spec="6.0.1" /&gt;
      &lt;plugin name="cordova-plugin-email-composer" spec="0.9.2"&gt;
          &lt;variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" /&gt;
      &lt;/plugin&gt;
      &lt;plugin name="mx.ferreyra.callnumber" spec="~0.0.2" /&gt;
      &lt;plugin name="cordova-plugin-file-opener2" spec="2.2.1"&gt;
          &lt;variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" /&gt;
      &lt;/plugin&gt;
      &lt;plugin name="cordova-plugin-screen-orientation" spec="3.0.2" /&gt;
      &lt;engine name="ios" spec="5.0.0" /&gt;
      &lt;engine name="android" spec="7.1.1" /&gt;
  &lt;/widget&gt;
  </code></pre>
  
  <p>I'm blocked on this issue since many days. I required you're help now and thanks for your answers !</p>