Comments (7)
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.
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.
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.
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?
from blockly-games.
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.
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.
from blockly-games.
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)
- Blockly Music - notes position on staff are off by an octave
- make languages fail HOT 2
- No confirmation or feedback of correct solution in Movie section HOT 3
- Ghosted image makes color impossible to decern HOT 4
- How can i get code without build? HOT 4
- build/closurebuilder.py: No such file or directory HOT 2
- Can't see the YES and CANCLE button after building HOT 1
- i want to build offline and set up block HOT 1
- Multiplayer - editable: true HOT 6
- not able to run the project locally on my machine HOT 4
- Requirements for build should specify python version. HOT 1
- Turtle level 3 message says "There's a new block..." twice. HOT 3
- bug on blockly games: maze HOT 3
- > I did this document to help ! π
- How to modify the pic of the pond-tutor game's avatar HOT 2
- SoundJS download error HOT 1
- Individual game make command not working HOT 2
- Migration Tracking Bug
- request: dark mode
- dev. How could I add some new changeable mazes in this codeοΌ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blockly-games.