Reputation: 374
I am currently working on a project in Angular 14 and using Node.js version 14.15.0. I am looking to upgrade the project to Angular 15 and Node.js version 18.10.0. However, I encounter errors when following the migration steps and running npm install. I have tried several times, removing node_modules and package-lock.json, but without success. Additionally, I have attempted various approaches, yet the issue persists.
Below is my current package.json for Angular 14. If anyone can offer assistance, it would be greatly appreciated.
{
"private": true,
"dependencies": {
"@angular/animations": "^14.3.0",
"@angular/common": "^14.3.0",
"@angular/compiler": "^14.3.0",
"@angular/core": "^14.3.0",
"@angular/fire": "^7.4.0",
"@angular/forms": "^14.3.0",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/pwa": "^0.803.5",
"@angular/router": "^14.3.0",
"@angular/service-worker": "^14.3.0",
"@capacitor/android": "^6.1.1",
"@capacitor/angular": "^2.0.3",
"@capacitor/app": "^6.0.0",
"@capacitor/app-launcher": "^6.0.1",
"@capacitor/camera": "^6.0.1",
"@capacitor/clipboard": "^6.0.0",
"@capacitor/core": "^6.1.1",
"@capacitor/device": "^6.0.0",
"@capacitor/dialog": "^6.0.0",
"@capacitor/filesystem": "^6.0.0",
"@capacitor/geolocation": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/ios": "^6.1.1",
"@capacitor/keyboard": "^6.0.1",
"@capacitor/network": "^6.0.1",
"@capacitor/preferences": "^6.0.1",
"@capacitor/share": "^6.0.1",
"@capacitor/splash-screen": "^6.0.1",
"@capacitor/status-bar": "^6.0.0",
"@capacitor/toast": "^6.0.1",
"@datorama/akita": "^4.23.2",
"@ionic-native/action-sheet": "^5.29.0",
"@ionic-native/background-mode": "^5.36.0",
"@ionic-native/base64": "^5.27.0",
"@ionic-native/calendar": "^5.27.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/date-picker": "^5.28.0",
"@ionic-native/device": "^5.27.0",
"@ionic-native/insomnia": "^5.32.1",
"@ionic-native/keyboard": "^5.14.0",
"@ionic-native/launch-navigator": "^5.29.0",
"@ionic-native/network": "^5.28.0",
"@ionic-native/open-native-settings": "^5.28.0",
"@ionic-native/photo-viewer": "^5.28.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.28.0",
"@ionic/angular": "^6.7.5",
"@ionic/pwa-elements": "^1.5.2",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@types/adal": "^1.0.29",
"@types/adal-angular": "^1.0.1",
"adal-angular": "^1.0.17",
"adal-ts": "^0.6.0",
"akita": "^0.9.0",
"angular-custom-dropdown": "^1.1.1",
"angular-google-tag-manager": "^1.2.3",
"com-badrit-base64": "^0.2.0",
"com-sarriaroman-photoviewer": "^1.2.5",
"cordova-open-native-settings": "^1.5.2",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-background-mode": "^0.7.3",
"cordova-plugin-calendar": "^5.1.5",
"cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-insomnia": "^4.3.0",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-statusbar": "^2.4.3",
"core-js": "^2.5.4",
"crypto-js": "^4.0.0",
"css-vars-ponyfill": "^2.1.2",
"dexie": "^3.0.1",
"firebase": "9",
"fuse.js": "^6.2.0",
"hammerjs": "^2.0.8",
"idb": "^5.0.3",
"ion2-calendar": "^3.0.0-rc.0",
"ionicons": "^5.2.3",
"jetifier": "^1.6.6",
"leaflet": "file:./custom_lib/leaflet_lj/leaflet-1.3.4.tgz",
"leaflet-ant-path": "^1.2.1",
"leaflet-routing-machine": "^3.2.12",
"leaflet.marker.slideto": "^0.2.0",
"leaflet.motion": "^0.1.5",
"localforage": "^1.7.3",
"lodash": "^4.17.15",
"moment": "^2.27.0",
"ngx-cookie-service": "^2.2.0",
"ngx-swiper-wrapper": "^8.0.1",
"polyline-encoded": "0.0.9",
"robust-point-in-polygon": "^1.0.3",
"rxjs": "~6.6.3",
"rxjs-compat": "^6.5.2",
"sass": "^1.32.7",
"tslib": "^1.9.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.5",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1402.13",
"@angular-devkit/build-angular": "^14.2.13",
"@angular-devkit/core": "^14.2.13",
"@angular-devkit/schematics": "^14.2.13",
"@angular/cli": "^14.2.13",
"@angular/compiler-cli": "^14.3.0",
"@angular/language-service": "^14.3.0",
"@capacitor/cli": "^6.1.1",
"@ionic/angular-toolkit": "^6.0.0",
"@ionic/app-scripts": "^3.2.4",
"@ionic/v4-migration-tslint": "^1.7.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/leaflet": "file:./custom_lib/@types/leaflet",
"@types/node": "^14.14.16",
"codelyzer": "^5.0.0",
"del": "^6.0.0",
"firebase-tools": "^9",
"fuzzy": "^0.1.3",
"gulp": "^4.0.2",
"gulp-strip-comments": "^2.5.2",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~6.4.2",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~7.0.0",
"sonar-scanner": "^3.1.0",
"ts-node": "~7.0.0",
"tslint": "^6.1.3",
"typedoc": "^0.20.24",
"typescript": "^4.8.4"
},
"browser": {
"crypto": false
}
}
##error## when i perform npm install
2752 verbose node v18.10.0 12753 verbose npm v8.19.2 12754 error code 1 12755 error path /Users/user/Documents/repositories/pocmobile2.0/node_modules/node-sass 12756 error command failed 12757 error command sh -c -- node scripts/build.js 12758 error Building: /Users/user/.nvm/versions/node/v18.10.0/bin/node /Users/user/Documents/repositories/pocmobile2.0/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= 12758 error c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=
I have followed several steps from the Angular upgrade guide and various solutions from Stack Overflow, but I haven't been successful. I need to get the project working with Node.js 18.10.0 in Angular 15 or Angular 16.
Note*
i tried running npm ls "node-sass" and found this, i think this is the reason behind this issue? └─┬ @ionic/[email protected] └── [email protected]
Upvotes: 0
Views: 81