Closed elenaaralla closed 7 years ago
FYI, neither of those errors are actual errors, I recognize both of those variables as coming from external (and optional) components. So the issue here is how to suppress these from being reported as errors.
Hi thank you for the light-fast answer! I supposed that they are defined somewhere...but I was wondering if I missed something
Both are defined in files that Closure Compiler can't see. The proper way to fix this would be to create externs for them. Try editing this file: https://github.com/google/blockly-games/blob/master/externs/interpreter-externs.js And add the following at the end:
var BlocklyStorage = {};
BlocklyStorage.backupOnUnload = function() {};
BlocklyStorage.restoreBlocks = function() {};
BlocklyStorage.link = function() {};
BlocklyStorage.retrieveXml = function(key) {};
BlocklyStorage.alert = function(message) {};
var prettyPrintOne = function(code, lang) {};
Hi the changes you suggested fixed the errors and I was able to build maze-en There are still a lot of warnings (844!), maybe related to the error I get when I click on the pegman-button in the top right corner (TypeError: cd.jt is not a function. (In 'cd.jt(a,"buttonHover")', 'cd.jt' is undefined)
if I run maze in debug mode (using uncompressed file), the error is:
TypeError: Blockly.addClass is not a function. (In 'Blockly.addClass(button, 'buttonHover')', 'Blockly.addClass_' is undefined)
any clues?
Thanks NeilFraser, I did what you advised. Now I am getting lot of warnings but no error, but when I hit the url to pong-duck, I get a blank page. No console error. Any pointers?
The same error came for me (Blockly.addClass_ is not a function). I fixed it making the following change.
The line numbers in maze.js were 819 and 843. It had
Blockly.addClass_(button, 'buttonHover');
Blockly.removeClass_(document.getElementById('pegmanButton'), 'buttonHover');
I changed this to
Blockly.utils.addClass(button, 'buttonHover');
Blockly.utils.removeClass(document.getElementById('pegmanButton'), 'buttonHover');
I found this by looking at the code of utils.js under the third-party/blockly/core/utils.js.
Several dependencies (including Blockly) changed over time, breaking the build. Blockly Games has been updated so that everything builds properly now.
Hi, I'm trying to compile blockly-games on Mac OSx Sierra 10.12.2
I was able to git clone and make deps, but when I run make maze-en (as an example) I get the following errors and warnings
any suggestion? thank you in advance Elena
=========================