-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'variable data is undeclared' when attempting to use Google Closure Compiler #516
Comments
Thanks @ashpr for reporting this. Just curious, which version are you using? Here's ours: https://github.com/ably/ably-js/blob/master/package.json#L26 |
Here's the version I'm using bundled with the closure plugin for Webpack So I'm two released versions ahead. I did find this in the patch notes for v20180319
See here: https://github.com/google/closure-compiler/wiki/Releases I suspect that might have something to do with it. Thanks for acknowledging this @funkyboy ! |
@ashpr I just tried with your version and it still works. It's not related to the version number but to the compilation_level. We are using SIMPLE_OPTIMIZATIONS and I am guessing you are using |
@funkyboy this is a bit of a moot point, the line ashpr pointed out is clearly wrong and needs to be fixed regardless |
@SimonWoolf sure. The reason I am asking is that I don't get only that error when I take up a notch the optimization level.
|
@funkyboy You are correct. I only get that error in advanced builds. Nothing else comes up I'm afraid. I have an extern for the exports variable but nothing for the define and Buffer variables so i'm not sure why they are not being flagged. The GCC NPM repo does come pre-loaded with nodejs externs that may be automatically injected but I can't find any kind of logging to confirm. |
@ashpr Good. This change has been merged and will be included in the next release. |
Thank you @funkyboy . Much appreciated! |
So I'm trying to build a project of ours using ably and compress it via google closure compiler.
It throws the following error:
I found it's this line here..
ably-js/common/lib/types/message.js
Line 67 in d502382
I think 'data' is meant to be 'this.data'.. if this could be changed that would be terrific.
The text was updated successfully, but these errors were encountered: