google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.41k stars 1.15k forks source link

TypeError: Cannot read property 'g' of null #2440

Open viveleroi opened 7 years ago

viveleroi commented 7 years ago

I'm using closure-compiler with rollup, for a babel-transpiled library (https://github.com/helion3/inspire-tree). I'm seeing the following errors, both on node v6 and node v7.9.0.

java.lang.RuntimeException: java.lang.RuntimeException: INTERNAL COMPILER ERROR. Please report this problem.  (TypeError) : Cannot read property 'g' of null   Node(FUNCTION map$1): Input_0:5125:0 function map$1(tree, method, args) {   Parent(BLOCK): Input_0:12:22 }(this, (function (_) { 'use strict';
Error: Error transforming bundle with 'closure-compiler-js' plugin: java.lang.RuntimeException: java.lang.RuntimeException: INTERNAL COMPILER ERROR. Please report this problem.  (TypeError) : Cannot read property 'g' of null   Node(FUNCTION map$1): Input_0:5125:0 function map$1(tree, method, args) {   Parent(BLOCK): Input_0:12:22 }(this, (function (_) { 'use strict';
    at eJ.AG (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:7628:22102)
    at eJ.DG (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:7628:22303)
    at eJ (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:3482:76)
    at FFb (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:4529:86)
    at FDb (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:6320:95)
    at J6c (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:7255:359)
    at tJ (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:1746:29)
    at wJ (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:3043:44)
    at /Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/jscomp.js:3215:46
    at Object.module.exports [as compile] (/Users/viveleroi/Sites/inspire-tree/node_modules/google-closure-compiler-js/compile.js:31:15)
    at Object.transformBundle (/Users/viveleroi/Sites/inspire-tree/node_modules/rollup-plugin-closure-compiler-js/dist/rollup-plugin-closure-compiler-js.js:160:50)
    at /Users/viveleroi/.nvm/versions/node/v6.1.0/lib/node_modules/rollup/src/utils/transformBundle.js:10:20
    at Array.reduce (native)
    at transformBundle (/Users/viveleroi/.nvm/versions/node/v6.1.0/lib/node_modules/rollup/src/utils/transformBundle.js:4:17)
    at Bundle.render (/Users/viveleroi/.nvm/versions/node/v6.1.0/lib/node_modules/rollup/src/Bundle.js:422:10)
    at generate (/Users/viveleroi/.nvm/versions/node/v6.1.0/lib/node_modules/rollup/src/rollup.js:73:28)
    at Object.write (/Users/viveleroi/.nvm/versions/node/v6.1.0/lib/node_modules/rollup/src/rollup.js:102:20)
    at /Users/viveleroi/.nvm/versions/node/v6.1.0/lib/node_modules/rollup/bin/rollup:907:18
dimvar commented 7 years ago

This stack trace does not include any closure compiler code, so it's hard to know what's going on. Please try to reproduce using the compiler's command line, and provide us with repro steps. Closing issue for now.

Dominator008 commented 7 years ago

Looks like you are using rollup-closure-compiler-js. The stack trace is from the GWT-compiled version of Closure Compiler. Could you give me a clear step-by-step guide to reproduce the problem? Thanks.

tadeegan commented 7 years ago

Perhaps it would be good to distribute a pretty printed version of the GWT compile so that the stack trace is somewhat useful.