since i have installed the latest version in Nodejs(v16.13.2), i’m unabel to run my application
runnig
ionic serve
command shows this error in console
[app-scripts] node:internal/modules/cjs/loader:936
[app-scripts] throw err;
[app-scripts] ^
[app-scripts] Error: Cannot find module ‘node-sass’
i have tried to install
[email protected]
version, but it failed
npm install --unsafe-perm node-sass --save
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: essyndic@undefined
npm WARN Found: [email protected]
npm WARN node_modules/node-sass
npm WARN node-sass@"^4.10.0" from @ionic/[email protected]
npm WARN node_modules/@ionic/app-scripts
npm WARN dev @ionic/app-scripts@"^3.2.4" from the root project
npm WARN 3 more (gulp-sass, sass-loader, the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional node-sass@"^4.0.0 || ^5.0.0 || ^6.0.0" from [email protected]
npm WARN node_modules/sass-loader
npm WARN sass-loader@"^11.1.1" from the root project
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\Asus\\Desktop\\SyndicDigit01092021\\node_modules\\gulp-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Users\Asus\AppData\Local\Programs\Python\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Users\Asus\AppData\Local\Programs\Python\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Asus\\Desktop\\SyndicDigit01092021\\node_modules\\gulp-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\gulp-sass\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
i even tried to upgrade @ionic/app-script, but it also failed
npm install @ionic/app-scripts@latest --save
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\Asus\\Desktop\\SyndicDigit01092021\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Users\Asus\AppData\Local\Programs\Python\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Users\Asus\AppData\Local\Programs\Python\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Asus\\Desktop\\SyndicDigit01092021\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
downgrading Nodejs is not an option!
what should i do please ?
this reminds me of node version mismatches with the version of ionic, angular or other dependencies. Maybe post package.json here?
If you dont want to downgrade node (why?), well, then you may have to upgrade other packages.
ps. are you using nvm to manage node versions? So you can check with a lower versions and revert back easily?
"build": "ionic-app-scripts build --dev",
"ionic:build": "ionic-app-scripts build --dev",
"ionic:serve": "ionic-app-scripts serve"
"config": {
"ionic_source_map_type": "eval"
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/cli": "^6.2.9",
"@angular/common": "^6.1.10",
"@angular/compiler": "6.1.10",
"@angular/compiler-cli": "6.1.10",
"@angular/core": "^6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "^6.1.10",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@capacitor/android": "^1.2.1",
"@capacitor/core": "^1.2.1",
"@ionic-native/android-permissions": "^4.20.0",
"@ionic-native/base64": "^5.22.0",
"@ionic-native/call-number": "^5.28.0",
"@ionic-native/camera": "^4.20.0",
"@ionic-native/core": "4.20.0",
"@ionic-native/document-viewer": "^4.20.0",
"@ionic-native/downloader": "^5.26.0",
"@ionic-native/fcm": "^4.20.0",
"@ionic-native/file": "^4.20.0",
"@ionic-native/file-opener": "^4.20.0",
"@ionic-native/file-path": "4.20.0",
"@ionic-native/file-transfer": "^4.20.0",
"@ionic-native/firebase": "^4.20.0",
"@ionic-native/firebase-authentication": "^4.20.0",
"@ionic-native/image-resizer": "4.20.0",
"@ionic-native/in-app-browser": "^4.20.0",
"@ionic-native/launch-navigator": "^4.20.0",
"@ionic-native/local-notifications": "^4.20.0",
"@ionic-native/network": "^4.20.0",
"@ionic-native/preview-any-file": "^5.27.0",
"@ionic-native/push": "^4.20.0",
"@ionic-native/qr-scanner": "^4.20.0",
"@ionic-native/sms": "^5.36.0",
"@ionic-native/splash-screen": "^4.20.0",
"@ionic-native/status-bar": "4.20.0",
"@ionic/angular": "4.11.2",
"@ionic/storage": "^2.2.0",
"@ionic/utils-subprocess": "^2.1.3",
"@ngx-gallery/core": "2.0.1",
"@ngx-gallery/gallerize": "2.0.1",
"@ngx-gallery/lightbox": "2.0.1",
"@types/html2canvas": "0.0.35",
"@types/jspdf": "^1.3.3",
"@types/lodash": "^4.14.116",
"angular-font-awesome": "^3.1.2",
"angular2-text-mask": "^9.0.0",
"angularfire2": "^5.0.0-rc.3",
"bn-ng-pdf-viewer": "^1.3.0",
"bootstrap": "^3.4.1",
"call-number": "^1.0.1",
"cordova": "^10.0.0",
"cordova-plugin-android-native-pdfviewer": "^1.2.0",
"cordova-plugin-android-permissions": "^1.1.2",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": " 1.1.0",
"cordova-plugin-device": " 2.0.2",
"cordova-plugin-document-viewer": "^0.9.13",
"cordova-plugin-fcm": "^2.1.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file-opener2": "^3.0.0",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-inappbrowser": "^4.0.0",
"cordova-plugin-preview-any-file": "^0.1.6",
"cordova-plugin-qrscanner": "^3.0.1",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-res": "^0.14.0",
"file-saver": "^2.0.2",
"firebase": "^4.5.2",
"flag-icon-css": "^3.5.0",
"google-libphonenumber": "^3.2.25",
"hammerjs": "^2.0.8",
"html2canvas": "^1.0.0-rc.7",
"integrator-cordova-plugin-downloader": "^1.1.0",
"intl-input-phone": "0.0.7",
"intl-tel-input": "^17.0.3",
"ionic": "^5.4.16",
"ionic-alpha-scroll": "^0.1.5",
"ionic-angular": "3.9.5",
"ionic-plugin-keyboard": "2.2.1",
"ionic-text-mask": "^1.0.3",
"ionic-tooltips": "^3.1.0",
"ionic2-alpha-scroll": "^2.0.1",
"ionicons": "3.0.0",
"jspdf": "^2.3.1",
"moment": "^2.24.0",
"ng-dynamic": "3.0.2",
"ng2-pdf-viewer": "^3.0.8",
"ng2-pdfjs-viewer": "^5.0.7",
"ng2-tel-input": "^2.3.0",
"ngx-bootstrap": "^2.0.5",
"ngx-extended-pdf-viewer": "^2.2.0-beta.1",
"ngx-gallery": "^5.10.0",
"ngx-intl-tel-input": "^3.0.5",
"node-gyp": "^8.4.1",
"promise-polyfill": "^8.2.0",
"rxjs": "^6.6.7",
"rxjs-compat": "^6.0.0-rc.0",
"sass-loader": "^11.1.1",
"screenfull": "^3.3.0",
"sw-toolbox": "3.6.0",
"tslint-ionic-rules": "0.0.21",
"typescript": "^3.9.7",
"web-animations-js": "2.3.1",
"zone.js": "0.8.29"
"devDependencies": {
"@capacitor/cli": "^1.2.1",
"@ionic/app-scripts": "^3.2.4",
"@ionic/cli-plugin-cordova": "1.4.1",
"@ionic/cli-plugin-ionic-angular": "1.3.2",
"@ionic/lab": "3.1.7",
"@types/node": "^14.17.1",
"cordova-android": "^9.1.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-firebase": "git+https://github.com/jestcastro/cordova-plugin-firebase.git",
"cordova-plugin-firebase-analytics": "^6.0.1",
"cordova-plugin-firebase-authentication": "^5.0.0",
"cordova-plugin-firebase-messaging": "^6.0.0",
"cordova-plugin-ionic-webview": " 4.1.2",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-splashscreen": " 5.0.2",
"cordova-sms-plugin": "^1.0.1",
"cordova-support-android-plugin": "~1.0.0",
"grunt": "^1.4.1",
"grunt-contrib-jshint": " 2.1.0",
"grunt-contrib-nodeunit": "^3.0.0",
"grunt-contrib-uglify": " 4.0.1",
"gulp": " 4.0.2",
"gulp-clean-css": " 4.2.0",
"gulp-dart-sass": "^1.0.2",
"gulp-rename": "1.2.2",
"gulp-replace": "0.5.4",
"gulp-sass": "^3.2.1",
"gulp-tslint": "6.1.2",
"node-pre-gyp": "0.17.0",
"phonegap-plugin-multidex": "^1.0.0",
"sass": "^1.49.7",
"ws": "3.3.2"
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-device",
"ionic-plugin-keyboard"
"cordovaPlatforms": [
"andoid",
"platform": "android",
"version": "",
"locator": "android"
"description": "Essyndic: vivons mieux ensemble !!!",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-camera": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
"cordova-plugin-statusbar": {},
"cordova-plugin-compat": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-file-opener2": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
"cordova-plugin-file": {},
"cordova-plugin-android-permissions": {},
"integrator-cordova-plugin-downloader": {},
"cordova-plugin-document-viewer": {},
"cordova-plugin-preview-any-file": {},
"mx.ferreyra.callnumber": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-network-information": {},
"cordova-plugin-qrscanner": {},
"cordova-plugin-firebase-authentication": {
"FIREBASE_AUTH_VERSION": "version",
"ANDROID_FIREBASE_AUTH_VERSION": "21.0.+"
"cordova-plugin-firebase-messaging": {
"ANDROID_FIREBASE_MESSAGING_VERSION": "22.0.+",
"ANDROIDX_CORE_VERSION": "1.6.+"
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-androidx": {},
"cordova-plugin-local-notification": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"GOOGLE_API_KEY_FOR_ANDROID": "{AIzaSyDKPoxyq-fz2PvPucpBSonxif4HbhZJI94}",
"OKHTTP_VERSION": "3.12.0"
"cordova-plugin-firebase-analytics": {},
"cordova-plugin-firebase": {},
"cordova-sms-plugin": {}
"platforms": [
"android"
And why cant u downgrade node?
I truly wonder if this node version does go well with angular 6 and everything that depends on it - including ionic
So why not downgrade node? Are there dependencies in the package that needs node16 or are there other projects on your machine dependent on it (then use nvm)
The other option is to upgrade stuff until it works - imho that is the hardest way because of breaking changes and the fact u cant test if the app works
stackoverflow.com
i have solved it by removing sass-loader
package!
i have installed successfuly [email protected] for nodejs V16
and ionic serve works perfectly now!
thanks for your help Sir!
Hi my friend, I have the same issue. remove sass-loader
,What command should be executed?
thank you !.