Git Product home page Git Product logo

Comments (7)

NeilFraser avatar NeilFraser commented on May 5, 2024 1

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) {};

from blockly-games.

NeilFraser avatar NeilFraser commented on May 5, 2024

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.

from blockly-games.

elenaaralla avatar elenaaralla commented on May 5, 2024

Hi
thank you for the light-fast answer!
I supposed that they are defined somewhere...but I was wondering if I missed something

from blockly-games.

elenaaralla avatar elenaaralla commented on May 5, 2024

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?

build_log.txt

from blockly-games.

sandysaahil avatar sandysaahil commented on May 5, 2024

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?

from blockly-games.

hariscybersquare avatar hariscybersquare commented on May 5, 2024

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.

screen shot 2017-07-14 at 4 16 43 am

from blockly-games.

NeilFraser avatar NeilFraser commented on May 5, 2024

Several dependencies (including Blockly) changed over time, breaking the build. Blockly Games has been updated so that everything builds properly now.

from blockly-games.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.