holatuwol / liferay-intellij

Tool to build out IntelliJ workspace project for Liferay, originally designed as an introduction to streams concepts for Java developers.
52 stars 51 forks source link

RangeError: Maximum call stack size exceeded #11

Closed jcampoy closed 4 years ago

jcampoy commented 4 years ago

Hi @holatuwol ,

I am finding errors when I try to build the portal project in current master, this is the output:

 ij .
[09:32:10] Running npm to update script dependencies
audited 49 packages in 0.654s
found 2 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
[09:32:12] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:32:13] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:32:15] Missing clone of https://github.com/liferay/liferay-binaries-cache-2017
[09:32:15] Missing clone of https://github.com/liferay/liferay-binaries-cache-2020
[09:32:15] Retrieving dependency libraries using Maven
[9:32:15 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:32:15 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:32:15 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:32:15 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:32:15 AM] Extracting metadata from module build files
[9:32:17 AM] Extracting metadata from root level folder build files
[9:32:17 AM] Extracting metadata from legacy plugin build files
[9:32:17 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:32:18 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:32:18 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
[9:32:19 AM] Remembering 5483 artifacts found in /Users/jose/.m2/repository
[9:32:19 AM] Analyzing existing IntelliJ breakpoints
/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22
exports.getName = function(elem){
                          ^

RangeError: Maximum call stack size exceeded
    at Object.exports.getName (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22:27)
    at tag (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/cheerio/node_modules/css-select/lib/general.js:21:11)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:87:6)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.257 s
[INFO] Finished at: 2019-10-29T09:32:20+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline (default-cli): Goal requires a project to execute but there is no POM in this directory (/Users/jose/code/portal). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
grep: pom.xml: No such file or directory
rm: pom.xml: No such file or directory
[9:32:25 AM] Scanning . ls-files cache for legacy plugins
[9:32:25 AM] Located 14 legacy plugins folders in .
[9:32:25 AM] Scanning modules ls-files cache for modules
[9:32:25 AM] Located 1492 modules folders in modules
[9:32:25 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:32:25 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:32:25 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:32:25 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:32:25 AM] Extracting metadata from module build files
[9:32:27 AM] Extracting metadata from root level folder build files
[9:32:27 AM] Extracting metadata from legacy plugin build files
[9:32:27 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:32:28 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:32:28 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
^C%

jose@xcmp [09:32:30] [~/code/portal] [master *]
-> % ij .
[09:33:06] Running npm to update script dependencies
audited 49 packages in 0.547s
found 2 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
[09:33:07] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:33:08] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:33:10] Missing clone of https://github.com/liferay/liferay-binaries-cache-2017
[09:33:10] Missing clone of https://github.com/liferay/liferay-binaries-cache-2020
[09:33:10] Retrieving dependency libraries using Maven
[9:33:10 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:33:10 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:33:10 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:33:10 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:33:10 AM] Extracting metadata from module build files
[9:33:11 AM] Extracting metadata from root level folder build files
[9:33:11 AM] Extracting metadata from legacy plugin build files
[9:33:11 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:33:12 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:33:12 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
[9:33:12 AM] Remembering 5483 artifacts found in /Users/jose/.m2/repository
[9:33:12 AM] Analyzing existing IntelliJ breakpoints
/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22
exports.getName = function(elem){
                          ^

RangeError: Maximum call stack size exceeded
    at Object.exports.getName (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22:27)
    at tag (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/cheerio/node_modules/css-select/lib/general.js:21:11)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:87:6)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.195 s
[INFO] Finished at: 2019-10-29T09:33:13+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline (default-cli): Goal requires a project to execute but there is no POM in this directory (/Users/jose/code/portal). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
grep: pom.xml: No such file or directory
rm: pom.xml: No such file or directory
[9:33:17 AM] Scanning . ls-files cache for legacy plugins
[9:33:17 AM] Located 14 legacy plugins folders in .
[9:33:17 AM] Scanning modules ls-files cache for modules
[9:33:17 AM] Located 1492 modules folders in modules
[9:33:17 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:33:17 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:33:17 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:33:17 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:33:17 AM] Extracting metadata from module build files
[9:33:19 AM] Extracting metadata from root level folder build files
[9:33:19 AM] Extracting metadata from legacy plugin build files
[9:33:19 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:33:20 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:33:20 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
[9:33:20 AM] Remembering 5483 artifacts found in /Users/jose/.m2/repository
[9:33:20 AM] Analyzing existing IntelliJ breakpoints
/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domelementtype/index.js:12
    isTag: function(elem){
                   ^

RangeError: Maximum call stack size exceeded
    at isTag (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domelementtype/index.js:12:17)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:86:7)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
    at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
holatuwol commented 4 years ago

@jcampoy: I switched to using npm ci so that it doesn't download the buggy version of domutils that causes that maximum call stack size exception on OS X. Can you let me know if that fixes your issue?

jcampoy commented 4 years ago

Thank you @holatuwol ! it seems to work, but now it is stopping in an other point, when trying to download some libs.

Do you know if the rest of the project will get build in spite of this error? Thanks!

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/jose/code/portal/tmp/ijbuild/build.gradle' line: 259

* What went wrong:
A problem occurred evaluating root project 'ijbuild'.
> Could not resolve all files for configuration ':compile'.
   > Could not find com.liferay:com.documentum.dctm:6.6.0.039.
     Searched in the following locations:
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.pom
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.jar
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.pom
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.jar
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.pom
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.jar
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.pom
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.dctm/6.6.0.039/com.documentum.dctm-6.6.0.039.jar
     Required by:
         project :
   > Could not find com.liferay:com.documentum.dfc:6.6.0.039.
     Searched in the following locations:
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.pom
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.jar
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.pom
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.jar
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.pom
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.jar
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.pom
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.dfc/6.6.0.039/com.documentum.dfc-6.6.0.039.jar
     Required by:
         project :
   > Could not find com.liferay:com.documentum.services.config.api:6.6.0.040.
     Searched in the following locations:
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.pom
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.jar
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.pom
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.jar
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.pom
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.jar
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.pom
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.services.config.api/6.6.0.040/com.documentum.services.config.api-6.6.0.040.jar
     Required by:
         project :
   > Could not find com.liferay:com.documentum.services.config.impl:6.6.0.040.
     Searched in the following locations:
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.pom
       - file:/Users/jose/code/portal/.m2/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.jar
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.pom
       - http://repo.maven.apache.org/maven2/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.jar
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.pom
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.jar
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.pom
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.documentum.services.config.impl/6.6.0.040/com.documentum.services.config.impl-6.6.0.040.jar
     Required by:
         project :
   > Could not find com.liferay:com.rsa.certj:2.2.0.0.
     Searched in the following locations:
       - file:/Users/jose/code/portal/.m2/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.pom
       - file:/Users/jose/code/portal/.m2/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.jar
       - http://repo.maven.apache.org/maven2/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.pom
       - http://repo.maven.apache.org/maven2/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.jar
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.pom
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.jar
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.pom
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.rsa.certj/2.2.0.0/com.rsa.certj-2.2.0.0.jar
     Required by:
         project :
   > Could not find com.liferay:com.rsa.jsafe:3.6.
     Searched in the following locations:
       - file:/Users/jose/code/portal/.m2/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.pom
       - file:/Users/jose/code/portal/.m2/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.jar
       - http://repo.maven.apache.org/maven2/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.pom
       - http://repo.maven.apache.org/maven2/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.jar
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.pom
       - https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.jar
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.pom
       - http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/liferay/com.rsa.jsafe/3.6/com.rsa.jsafe-3.6.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s

{ Error: Command failed: /Users/jose/code/portal/gradlew completeGradleCache
    at checkExecSyncError (child_process.js:637:11)
    at execFileSync (child_process.js:655:13)
    at executeGradleFile (/Users/jose/code/util/holatuwol/liferay-intellij/streams0/streams0.js:489:3)
    at /Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:301:18
    at /Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:1559:13
    at Stream.s._send (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:1285:9)
    at Stream.write (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:1375:18)
    at Stream._send (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:761:26)
    at push (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:1250:19)
    at /Users/jose/code/util/holatuwol/liferay-intellij/node_modules/highland/lib/index.js:3478:13
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 61837,
  stdout: null,
  stderr: null }
[10:54:39 AM] Missing dependencies have been downloaded
[10:54:39 AM] Generating IntelliJ workspace
holatuwol commented 4 years ago

@jcampoy : Some projects will not have all their dependencies downloaded, but everything else should be fine.

I've added an additional fail-safe to check for working.dir.properties (if you've already run ant setup-profile-dxp, or if you've copied the file manually), and to also ignore any /dxp/ projects from the attempt to complete the Gradle cache if it can't find working.dir.properties at all.

jcampoy commented 4 years ago

Thank you very much @holatuwol !! Closing this issue :)