Getting the following error when i run ng build --prod
chunk {1087} 1087.d0660c70a921ec2d081d.js () 2.41 kB [rendered] chunk {1088} 1088.81d657baee0203f2e23c.js () 1.24 kB [rendered] chunk {1089} 1089.e22e0e6466296922a63b.js () 3.15 kB [rendered] chunk {1090} 1090.35cf5f1ff3979025db82.js () 1.54 kB [rendered] chunk {1091} 1091.6234fa9298e4fcca6db6.js () 2.19 kB [rendered] chunk {scripts} scripts.64884b7aff66d8483343.js (scripts) 1.64 MB [entry] [rendered]
WARNING in ./node_modules/@swimlane/ngx-charts/release/common/base-chart.component.js 20:38-56 "export 'VisibilityObserver' was not found in '../utils'
ERROR in ./node_modules/object-path/index.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): Error: ENOENT: no such file or directory, open 'C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\object-path\index.js' at Object.openSync (fs.js:438:3) at Object.readFileSync (fs.js:343:35) at Storage.provideSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13) at CachedInputFileSystem.readFileSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32) at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\webpack-input-host.js:35:51) at Observable._trySubscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:44:25) at Observable.subscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:30:22) at SyncDelegateHost._doSyncCall (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:22:20) at SyncDelegateHost.read (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:49:21) at WebpackCompilerHost.readFileBuffer (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\compiler_host.js:125:44) at VirtualFileSystemDecorator.readFile (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\virtual_file_system_decorator.js:39:54) at processResource (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:202:11) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:158:10) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:165:10) at C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:176:18 at loadLoader (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\loadLoader.js:47:3) ERROR in ./node_modules/rtl-detect/index.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): Error: ENOENT: no such file or directory, open 'C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\rtl-detect\index.js' at Object.openSync (fs.js:438:3) at Object.readFileSync (fs.js:343:35) at Storage.provideSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13) at CachedInputFileSystem.readFileSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32) at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\webpack-input-host.js:35:51) at Observable._trySubscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:44:25) at Observable.subscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:30:22) at SyncDelegateHost._doSyncCall (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:22:20) at SyncDelegateHost.read (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:49:21) at WebpackCompilerHost.readFileBuffer (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\compiler_host.js:125:44) at VirtualFileSystemDecorator.readFile (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\virtual_file_system_decorator.js:39:54) at processResource (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:202:11) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:158:10) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:165:10) at C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:176:18 at loadLoader (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\loadLoader.js:47:3)
6 Answer(s)
-
0
Try deleting the node_modules directory and re-executing the yarn to install packages.
-
0
just deleted the node_modules folder and ran yarn again got the following warinings
C:\Users\vbelani\Amazing\AmazingSoftware\angular>yarn yarn install v1.15.2 [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "win32" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @angular/[email protected]" has incorrect peer dependency "zone.js@~0.8.26". warning " > @swimlane/[email protected]" has unmet peer dependency "d3@^4.10.2". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-array@^1.2.1". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-brush@^1.0.4". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-color@^1.0.3". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-force@^1.1.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-format@^1.2.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-hierarchy@^1.1.5". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-interpolate@^1.1.5". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-scale@^1.0.6". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-selection@^1.1.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-shape@^1.2.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-time-format@^2.1.0". warning " > @swimlane/[email protected]" has incorrect peer dependency "zone.js@^0.8.26". warning " > [email protected]" has incorrect peer dependency "@angular/[email protected]". warning " > [email protected]" has incorrect peer dependency "@angular/[email protected]".
could this be the issue how do i resolve these warnings
-
0
Ignore these warnings first, can you successfully execute: ng build --prod command?
-
0
now i am getting
C:\Users\vbelani\Amazing\AmazingSoftware\angular>ng build --prod Your global Angular CLI version (7.3.9) is greater than your local version (7.3.7). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false". 92% chunk asset optimization TerserPlugin <--- Last few GCs --->
[8664:000001E5342779F0] 213055 ms: Scavenge 1320.3 (1437.9) -> 1310.8 (1439.4) MB, 44.2 / 0.0 ms (average mu = 0.272, current mu = 0.294) allocation failure [8664:000001E5342779F0] 213205 ms: Scavenge 1324.1 (1439.4) -> 1314.6 (1442.4) MB, 20.1 / 0.0 ms (average mu = 0.272, current mu = 0.294) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 000002A315F5C5C1]
Security context: 0x031a8499e6e9 <JSObject> 1: _walk [00000389F951FA81] [C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\terser\dist\bundle.min.js:~1] [pc=000002A31903C529](this=0x022660b76dd1 <AST_SymbolRef map = 000003FCCF043181>,e=0x02ef5854c9c9 <gn map = 000003F62F605221>) 2: /* anonymous */ [000002C0C3566429] [C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\t...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF6F443F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114 2: 00007FF6F441A0C6 node::MakeCallback+4518 3: 00007FF6F441AA30 node_module_register+2032 4: 00007FF6F46A20EE v8::internal::FatalProcessOutOfMemory+846 5: 00007FF6F46A201F v8::internal::FatalProcessOutOfMemory+639 6: 00007FF6F4BC2BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556 7: 00007FF6F4BB9C46 v8::internal::ScavengeJob::operator=+24310 8: 00007FF6F4BB829C v8::internal::ScavengeJob::operator=+17740 9: 00007FF6F4BC0F87 v8::internal::Heap::MaxHeapGrowingFactor+2327 10: 00007FF6F4BC1006 v8::internal::Heap::MaxHeapGrowingFactor+2454 11: 00007FF6F477CDB7 v8::internal::Factory::NewFillerObject+55 12: 00007FF6F4812CC6 v8::internal::WasmJs::Install+29414 13: 000002A315F5C5C1
C:\Users\vbelani\Amazing\AmazingSoftware\angular>
i have already added ng-high-memory in package.json
"scripts": { "ng-high-memory": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng", "ng": "ng", "publish": "ng build --prod", "start": "ng serve --host 0.0.0.0 --port 4200", "hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr", "test": "ng test", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "protractor" },
-
0
try run:
npm run ng-high-memory -- build --prod
instead ofng build --prod
-
0
okay that command worked I increased the memory size to 16384 for good measure now I can deploy to azure
Just incase anyone is wondering I am remoting into my azure VM and checked if the build worked. I will be creating a course very soon how to setup development environment for aspnetzero and on my website amazingsolutions.com.au