Angular 7, npm 5.5.1 node 8.9.0
terminal
npm run build:test
[email protected] build:test C:Projectsfff
ng build –aot –build-optimizer –output-hashing=all
11% building modules 10/17 modules 7 active …fffsrclibcsscomponent.cssBrowserslist: caniuse-lite is outdated. Please run next command npm update
92% after chunk asset optimization SourceMapDevToolPlugin vendor.252af5e4ca571811ec29.js generate SourceMap
<— Last few GCs —>
[11300:000002C0DD75A2C0] 164886 ms: Mark-sweep 1412.1 (1557.3) -> 1412.1 (1519.3) MB, 673.1 / 0.0 ms last resort GC in old space requested
[11300:000002C0DD75A2C0] 165582 ms: Mark-sweep 1412.1 (1519.3) -> 1412.1 (1511.3) MB, 696.0 / 0.0 ms last resort GC in old space requested
<— JS stacktrace —>
==== JS stack trace =========================================
Security context: 0000000EC2725EC1
1: /* anonymous */ [C:Projectsfffnode_moduleswebpack-sourcesnode_modulessource-maplibsource-node.js:~342] [pc=00000111AF908CFC](this=000001C78768BE21 ,chunk=000002CFC1F07C09 <String[4]: /**n>,original=0000020414F69E59 )
2: SourceNode_walk [C:Projectsfff…
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed – JavaScript heap out of memory
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! [email protected] build:test: ng build --aot --build-optimizer --output-hashing=all
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the [email protected] build:test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersfffAppDataRoamingnpm-cache_logs2023-11-30T20_35_32_692Z-debug.log
log file
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build:test' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild:test', 'build:test', 'postbuild:test' ]
5 info lifecycle [email protected]~prebuild:test: [email protected]
6 info lifecycle [email protected]~build:test: [email protected]
7 verbose lifecycle [email protected]~build:test: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build:test: PATH: C:UsersSalamandraAppDataRoamingnvmv8.9.0node_modulesnpmbinnode-gyp-bin;C:Projectsfffnode_modules.bin;C:Usersfffbin;C:Program FilesGitmingw64bin;C:Program FilesGitusrlocalbin;C:Program FilesGitusrbin;C:Program FilesGitusrbin;C:Program FilesGitmingw64bin;C:Program FilesGitusrbin;C:Usersfffbin;C:Program Files (x86)Common FilesOracleJavajavapath;C:Python27;C:Python27Scripts;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.7bin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.7libnvvp;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:ProgramDatachocolateybin;C:Program FilesNVIDIA CorporationNsight Compute 2022.2.0;C:Program FilesNVIDIA CorporationNVIDIA NvDLISR;C:UsersfffAppDataRoamingnvm;C:Program Filesnodejs;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program FilesDockerDockerresourcesbin;C:Program FilesPowerShell7;C:UsersSalamandraAppDataLocalProgramsPythonPython310Scripts;C:UsersSalamandraAppDataLocalProgramsPythonPython310;C:UsersSalamandraanaconda3;C:UsersSalamandraanaconda3Librarymingw-w64bin;C:Usersfffanaconda3Libraryusrbin;C:Usersfffanaconda3Librarybin;C:Usersfffanaconda3Scripts;C:UsersfffAppDataLocalMicrosoftWindowsApps;C:UsersfffAppDataLocalProgramsMicrosoft VS Codebin;C:UsersfffAppDataRoamingnpm;C:UsersfffAppDataLocalGitHubDesktopbin;C:UsersfffAppDataRoamingnvm;C:Program Filesnodejs;C:Usersfff.dotnettools;C:Program Files (x86)Nmap;C:Program FilesGitusrbinvendor_perl;C:Program FilesGitusrbincore_perl
9 verbose lifecycle [email protected]~build:test: CWD: C:ProjectsSoldOutgitlab_soldout_frontsoldout_front
10 silly lifecycle [email protected]~build:test: Args: [ '/d /s /c',
10 silly lifecycle 'ng build --aot --build-optimizer --output-hashing=all' ]
11 silly lifecycle [email protected]~build:test: Returned: code: 3 signal: null
12 info lifecycle [email protected]~build:test: Failed to exec build:test script
13 verbose stack Error: [email protected] build:test: `ng build --aot --build-optimizer --output-hashing=all`
13 verbose stack Exit status 3
13 verbose stack at EventEmitter.<anonymous> (C:UsersfffAppDataRoamingnvmv8.9.0node_modulesnpmnode_modulesnpm-lifecycleindex.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:UsersfffAppDataRoamingnvmv8.9.0node_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd C:Projectsfff
16 verbose Windows_NT 10.0.22631
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build:test"
18 verbose node v8.9.0
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 3
22 error [email protected] build:test: `ng build --aot --build-optimizer --output-hashing=all`
22 error Exit status 3
23 error Failed at the [email protected] build:test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3, true ]
angular.json
"build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/browser", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ { "glob": "**/*", "input": "node_modules/leaflet/dist/images", "output": "leaflet/" }, "src/favicon.ico", "src/assets", "src/robots.txt", "src/sp-push-worker-fb.js" ], "styles": [ "node_modules/slick-carousel/slick/slick.scss", "node_modules/snazzy-info-window/dist/snazzy-info-window.css", "src/scss/styles.scss", "node_modules/leaflet/dist/leaflet.css", "src/lib/css/component.css", "node_modules/swiper/css/swiper.css", "node_modules/aos/dist/aos.css" ], "scripts": [ "node_modules/jquery/dist/jquery.min.js", "node_modules/slick-carousel/slick/slick.min.js", "node_modules/bootstrap/dist/js/bootstrap.js", "src/lib/js/modernizr.custom.js", "src/lib/js/jquery.dlmenu.js", "node_modules/swiper/js/swiper.min.js" ] }, "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" }, { "replace": "src/index.html", "with": "src/index.prod.html" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" } ] } }
deps
"private": true, "dependencies": { "@agm/core": "^1.0.0-beta.5", "@agm/snazzy-info-window": "^1.0.0-beta.5", "@angular/animations": "^7.0.4", "@angular/cdk": "~7.3.7", "@angular/common": "~7.0.0", "@angular/compiler": "~7.0.0", "@angular/core": "~7.0.0", "@angular/forms": "~7.0.0", "@angular/http": "~7.0.0", "@angular/material": "~7.3.7", "@angular/platform-browser": "~7.0.0", "@angular/platform-browser-dynamic": "~7.0.0", "@angular/platform-server": "~7.0.0", "@angular/router": "~7.0.0", "@asymmetrik/ngx-leaflet": "^5.0.2", "@biesbjerg/ngx-translate-extract": "^2.3.4", "@ngrx/effects": "^7.4.0", "@ngrx/store": "^7.4.0", "@ngrx/store-devtools": "^7.4.0", "@nguniversal/common": "^8.2.6", "@nguniversal/express-engine": "^7.1.1", "@nguniversal/module-map-ngfactory-loader": "0.0.0", "@ngx-translate/core": "^11.0.1", "@ngx-translate/http-loader": "^4.0.0", "@types/google.accounts": "^0.0.14", "@types/leaflet": "^1.5.2", "@types/moment": "^2.13.0", "angular2-multiselect-dropdown": "^4.6.3", "angular2-text-mask": "^9.0.0", "aos": "^3.0.0-beta.6", "bootstrap": "^4.3.1", "core-js": "^2.5.4", "express": "^4.15.2", "hammerjs": "^2.0.8", "jquery": "^3.4.0", "leaflet": "^1.5.1", "localstorage-polyfill": "^1.0.1", "moment": "^2.24.0", "net": "^1.0.2", "ngx-barcode": "^0.2.4", "ngx-image-cropper": "^1.3.9", "ngx-pinch-zoom": "^1.2.5", "ngx-plyr": "^1.1.1", "ngx-slick-carousel": "^0.4.4", "node-sass": "^4.13.1", "panzoom": "^9.2.1", "plyr": "^3.4.7", "rxjs": "~6.3.3", "saturn-datepicker": "7.3.0", "sitemap-generator-cli": "^4.3.0", "slick-carousel": "^1.8.1", "snazzy-info-window": "^1.1.1", "sockjs-client": "^1.3.0", "stompjs": "^2.3.3", "svg-pan-zoom": "github:ariutta/svg-pan-zoom", "swiper": "^5.2.1", "zone.js": "~0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.10.0", "@angular/cli": "~7.0.3", "@angular/compiler-cli": "~7.0.0", "@angular/language-service": "~7.0.0", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.5.0", "custom-cursor.js": "^1.0.6", "husky": "^1.3.1", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "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", "ngrx-store-freeze": "^0.2.4", "protractor": "~5.4.0", "ts-loader": "^5.2.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "tslint-eslint-rules": "^5.4.0", "typescript": "~3.1.1", "webpack-cli": "^3.1.0" } }
node –max_old_space_size=4096 is not working
build with –prod is working