compodoc: [BUG] Continue to have issues with Cannot Enlarge Memory Arrays

Overview of the issue

Hello,

So I’ve been all over the web, here in gitlab and still no solution. I’m a 58 year old programmer with over 35 years experience. Here’s my issue(s);

… [14:59:05] Process module graph: ScreeningModule [14:59:05] Process module graph: ScreeningRoutingModule [14:59:05] Process module graph: ScreenshotModule [14:59:06] Process module graph: SearchModule [14:59:06] Process module graph: SearchRoutingModule [14:59:06] Process module graph: SharedModule

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0

[14:59:06] abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 "). Build with -s ASSERTIONS=1 for more info.

Operating System, Node.js, npm, compodoc version(s)

Windows 10 pro npm info using npm@6.4.1 npm info using node@v8.11.1

Angular configuration, a package.json file in the root folder

{ “name”: “new-enrollment”, “version”: “0.0.0”, “license”: “MIT”, “scripts”: { “ng”: “ng”, “doc:build”: “compodoc -p tsconfig.json”, “doc:serve”: “compodoc -s”, “doc:buildandserve”: “compodoc -p tsconfig.json -s”, “reports:doc”: “node ./tools/scripts/compodoc.js”, “start”: “ng serve”, “build”: “ng build”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e”, “gulp”: “gulp” }, “private”: true, “dependencies”: { “@agm/core”: “^1.0.0-beta.3”, “@angular/animations”: “^5.2.7”, “@angular/cdk”: “5.2.4”, “@angular/common”: “^5.2.7”, “@angular/compiler”: “^5.2.7”, “@angular/core”: “^5.2.7”, “@angular/forms”: “^5.2.7”, “@angular/http”: “^5.2.7”, “@angular/material”: “^5.2.5”, “@angular/platform-browser”: “^5.2.7”, “@angular/platform-browser-dynamic”: “^5.2.7”, “@angular/platform-server”: “^5.2.7”, “@angular/router”: “^5.2.7”, “@ng-bootstrap/ng-bootstrap”: “2.0.0”, “@ng-select/ng-select”: “2.4.2”, “@ngrx/effects”: “5.2.0”, “@ngrx/entity”: “^5.2.0”, “@ngrx/store”: “5.2.0”, “@ngrx/store-devtools”: “5.2.0”, “@ngui/datetime-picker”: “^0.16.2”, “@tensorflow/tfjs”: “^0.13.0”, “@types/animejs”: “^2.0.0”, “@types/cropperjs”: “^1.1.3”, “@types/fabric”: “^1.5.43”, “@types/html2canvas”: “0.5.32”, “@types/jspdf”: “1.1.31”, “addstyles”: “^1.0.5”, “angular-bootstrap-affix”: “^0.2.4”, “angular-froala-wysiwyg”: “^2.8.1”, “angular-mentions”: “^0.8.0”, “angular-split”: “^1.0.4”, “angular-svg-round-progressbar”: “^1.2.1”, “angular-tag-cloud-module”: “^2.4.0”, “angular2-busy”: “https://github.com/Sky4CE/angular2-busy/tarball/static-template”, “angular2-draggable”: “^1.4.2”, “angular2-google-maps”: “0.17.0”, “angular2-highcharts”: “^0.5.5”, “angular2-hotkeys”: “^2.0.4”, “angular2-mentions”: “^0.7.3”, “angular2-moment”: “^1.9.0”, “animejs”: “^2.2.0”, “aos”: “^3.0.0-beta.6”, “base64-img”: “^1.0.4”, “bodybuilder”: “2.2.15”, “bootstrap”: “^3.3.7”, “cache-loader”: “1.2.2”, “child_process”: “^1.0.2”, “classlist.js”: “^1.1.20150312”, “core-js”: “^2.4.1”, “cors-anywhere”: “^0.4.1”, “cropperjs”: “^1.4.1”, “curl”: “^0.1.4”, “dom-to-image”: “^2.6.0”, “elasticsearch”: “15.1.1”, “fabric”: “^2.3.6”, “ffmpeg”: “0.0.4”, “font-awesome”: “^4.7.0”, “gulp-version-append”: “0.2.0”, “hammerjs”: “^2.0.8”, “highcharts”: “6.0.7”, “html2canvas”: “1.0.0-alpha.12”, “imagemagick”: “^0.1.3”, “jquery”: “^3.2.1”, “jspdf”: "1.3.5 ", “lemmatizer”: “^ 0.0.1”, “lodash”: “^4.17.10”, “ng-multiselect-dropdown”: “^0.1.9”, “ng2-archwizard”: “^2.1.0”, “ng2-bootstrap-modal”: “https://github.com/Sky4CE/ng2-bootstrap-modal/tarball/v.1.0.2”, “ng2-bs3-modal”: “^0.10.4”, “ng2-ckeditor”: “1.1.9”, “ng2-completer”: “^1.5.2”, “ng2-file-upload”: “^1.2.1”, “ng2-inputmask”: “^0.2.5”, “ng2-ion-range-slider”: “2.0.0”, “ng2-select”: “^1.2.0”, “ng2-split-pane”: “^1.4.0”, “ng2-stomp-service”: “^1.2.2”, “ng2-ui”: “^0.14.1”, “ng2-validation”: “^4.2.0”, “ng4-popover”: “^1.0.23”, “ng5-slider”: “^1.1.3”, “ngx-bootstrap”: “^2.0.5”, “ngx-cookie”: “^2.0.1”, “ngx-editor”: “^3.3.0”, “ngx-highlight”: “0.0.3”, “ngx-logger”: “^3.1.0”, “ngx-masonry”: “^1.1.2”, “ngx-perfect-scrollbar”: “^5.3.3”, “ngx-toastr”: “^6.3.0”, “ngx-virtual-scroller”: “1.0.4”, “ngx-webcam”: “0.2.0”, “ngx-wow”: “^1.0.2”, “nlcst-parse-english”: “^1.1.2”, “nlcst-pattern-match”: “^1.3.4”, “npm”: “^5.6.0”, “path”: “0.12.7”, “pluralize”: “^7.0.0”, “popover”: “^2.4.1”, “pos”: “^0.4.2”, “primeng”: “6.1.7”, “rxjs”: “^5.5.6”, “simplengrams”: “^0.1.2”, “slick-carousel”: “^1.6.0”, “sockjs-client”: “^1.1.4”, “stompjs”: “^2.3.3”, “stopword”: “^0.1.9”, “style-loader”: “^0.23.1”, “underscore”: “^1.8.3”, “unoconv”: “^0.1.2”, “web-animations-js”: “^2.3.1”, “webui-popover”: “^1.2.18”, “zone.js”: “^0.8.4” }, “devDependencies”: { “@angular/cli”: “^1.7.4”, “@angular/compiler-cli”: “^5.2.7”, “@angular/language-service”: “^4.0.0”, “@compodoc/compodoc”: “^1.1.2”, “@types/googlemaps”: “3.29.0”, “@types/jasmine”: “2.5.45”, “@types/node”: “^6.0.108”, “angular-ide”: “^0.9.44”, “codelyzer”: “^3.0.1”, “gulp”: “4.0.0”, “jasmine-core”: “^2.6.2”, “jasmine-spec-reporter”: “^4.1.0”, “karma”: “^1.7.0”, “karma-chrome-launcher”: “^2.1.1”, “karma-cli”: “^1.0.1”, “karma-coverage-istanbul-reporter”: “^1.4.2”, “karma-jasmine”: “^1.1.2”, “karma-jasmine-html-reporter”: “^0.2.2”, “protractor”: “^5.1.2”, “ts-node”: “^3.0.4”, “tslint”: “^5.3.2”, “typescript”: “2.4.2” }, “description”: “This project was generated with Angular CLI version 1.1.3.”, “main”: “gulpfile.js”, “repository”: { “type”: “git”, “url”: “https://git.acompany/somecode.git” }, “keywords”: [], “author”: “” }

Compodoc installed globally or locally ?

BOTH!

I’m running the following in git bash window:

$ compodoc -s ALLOW_MEMORY_GROWTH=1 -p tsconfig.json -d documentation

This yields the following error:

1.1.7

Typescript version : 2.9.1

Node.js version : v8.11.1

Operating system : Windows 10

[14:59:51] No configuration file found, switching to CLI flags. [14:59:51] Provided source folder ALLOW_MEMORY_GROWTH=1 was not found in the current directory

If possible your terminal logs before the error

NA

Motivation for or Use Case

I cannot continue with COMPDOC and I desperately need to finish the documentation. This is a HUGE app

I have a large app and it fails

I’ve tried this… from this example: https://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js - Scroll to the accepted solution…

const {spawn} = require(‘child_process’); console.log(“spawn defined: before spawn”);

//spawn(/^win/.test(process.platform) ? ‘npm.cmd’ : ‘npm run compdoc’, // [‘-p’, ‘tsconfig.json’, ‘-d’, ‘documentation/’], { // stdio: ‘inherit’, // shell: true //});

spawn(‘npm run compdoc’, [‘-p’, ‘tsconfig.json’, ‘-d’, ‘documentation/’], { stdio: ‘inherit’, shell: true });

//const cmd = spawn(‘compdoc’, [‘-p’, ‘tsconfig.json’, ‘-d’, ‘documentation/’]);

//console.log(process.cmd); //spawn(‘Spawn Help: ‘, [’–help’]); //console.log("spawn CONSTANT: ", cmd);

//cmd.stdout.pipe(process.stdout); //cmd.stderr.pipe(process.stdout);

//(function () { // console.log(“inside function”); // //var childProcess = require(“child_process”); // var oldSpawn = cmd.spawn; // // function mySpawn() { // console.log(‘spawn called’); // console.log(arguments); // // var result = oldSpawn.apply(this, arguments); // return result; // } // // console.log(“before spawn”); // cmd.spawn = mySpawn; //})();

Related issues

Several times but not in the exact context I have…

Suggest a Fix

DAMN RIGHT, this is a “GEM” and I’ll help you contribute but you need to show where and how, STEP-BY-STEP how to increase the memory and either call COMPDOC via command line script that I wrote.

I placed it in the ROOT directory in ./tools/scripts/compdoc.js

I call it via:

node tools/scripts/compdoc.js

and get an error below…

spawn defined: before spawn npm info it worked if it ends with ok npm info using npm@6.4.1 npm info using node@v8.11.1 npm ERR! missing script: compdoc npm timing npm Completed in 185ms

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2019-01-03T23_05_48_923Z-debug.l og

and here’s that LOG:

0 info it worked if it ends with ok 1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’, 1 verbose cli ‘C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘run’, 1 verbose cli ‘compdoc’, 1 verbose cli ‘-p’, 1 verbose cli ‘tsconfig.json’, 1 verbose cli ‘-d’, 1 verbose cli ‘documentation/’ ] 2 info using npm@6.4.1 3 info using node@v8.11.1 4 verbose stack Error: missing script: compdoc 4 verbose stack at run (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\run-script.js:155:19) 4 verbose stack at C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\run-script.js:63:5 4 verbose stack at C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:115:5 4 verbose stack at C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:418:5 4 verbose stack at checkBinReferences_ (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:373:45) 4 verbose stack at final (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:416:3) 4 verbose stack at then (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:160:5) 4 verbose stack at C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:280:12 4 verbose stack at C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) 5 verbose cwd C:\petersprojects\wwwroot\repos\kyp-frontend 6 verbose Windows_NT 10.0.16299 7 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “run” “compdoc” “-p” “tsconfig.json” “-d” “documentation/” 8 verbose node v8.11.1 9 verbose npm v6.4.1 10 error missing script: compdoc 11 verbose exit [ 1, true ]

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 38 (6 by maintainers)

Most upvoted comments

Vincent,

28 days ago you stated this:

Hi, sorry, not right now. The work on changing the graph engine is at around 75%. We will except a release this month.

We’re at 4 FEB 19… I need, respectfully, this to work with larger apps… You program ROCKS, man… I need a workaround for now or a date when you’ll have the fix to this larger problem.

Thanks Vincent

Peter

@pborregg I am not out of business. I am just the only maintainer of this tool, with a daily job, a family… I know this issue is very confusing for users. I have a solution ready to add. I can add you inside early testers if you want. Give me some good vibes and i will try to fix this asap.

Hello Vincent. It’s now APR 10th and we haven’t heard back from you as to status of this bug. We all know you’re very busy and respect and can appreciate that. Please just let everyone know whether you’re making progress, blocked, need our help, etc… Share the branch and I can make a feature branch or something. It only breaks for me at a certain point otherwise, there’s no other issues. It’s the same place that it breaks. This tells me it’s something in my code that’s breaking your software.

If we can identify what causes that, it may go a long way to helping you fix the bug.

Let us/me know what we can do to be of assistance, sir.

Peter

Hi @pborregg

I have re-started the work on graph engine. T have to test it on existing projects, and compare both versions.

I will post updates soon. I cannot give a day or week, but that’s now my next big bug fixes.

Vincent, any luck with fixing this bug?

Thanks,

Peter

Hi, sorry, not right now. The work on changing the graph engine is at around 75%. We will except a release this month.