Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌闭包编译器错误“;首先在{SyntheticVarsDeclar}中声明的编译变量";_Javascript_Google Closure_Google Closure Compiler - Fatal编程技术网

Javascript 谷歌闭包编译器错误“;首先在{SyntheticVarsDeclar}中声明的编译变量";

Javascript 谷歌闭包编译器错误“;首先在{SyntheticVarsDeclar}中声明的编译变量";,javascript,google-closure,google-closure-compiler,Javascript,Google Closure,Google Closure Compiler,当使用Google closure编译器尝试使用calcdeps.py编译从其(无外部代码)中获取的闭包依赖项时,在生成的代码(运行良好)上运行编译器时,我会出现以下错误: 编译的变量仅在计算依赖项生成的文件中的两个位置使用,并且没有在其中的任何位置声明。我看到它唯一声明的地方是base.js。尝试在开始时声明它,并像这样使用: /** * @define {boolean} Overridden to true by the compiler when --closure_pass *

当使用Google closure编译器尝试使用
calcdeps.py
编译从其(无外部代码)中获取的闭包依赖项时,在生成的代码(运行良好)上运行编译器时,我会出现以下错误:


编译的变量仅在计算依赖项生成的文件中的两个位置使用,并且没有在其中的任何位置声明。我看到它唯一声明的地方是base.js。

尝试在开始时声明它,并像这样使用:

/**
* @define {boolean} Overridden to true by the compiler when --closure_pass
*                   or --mark_as_compiled is specified.
*/
var COMPILED = false;

我几乎可以肯定它会解决问题,事实上我甚至认为你不需要标签。另外,请尝试下载最新的编译器或从svn编译它,因为之前有报告,它已得到修复。

这曾经是闭包编译器中的一个错误。显然它已经被修复了。您应该下载当前版本的闭包编译器


闭包编译器问题跟踪器中有一个关于此问题的闭包。

能否提供使用COMPILED/declard的两行代码?
/**
* @define {boolean} Overridden to true by the compiler when --closure_pass
*                   or --mark_as_compiled is specified.
*/
var COMPILED = false;