Giter VIP home page Giter VIP logo

Comments (7)

roroettg avatar roroettg commented on June 15, 2024

Hi,

I think you might have forgotten to add the original blockly javascript-files to your scripts in your angular.json

"scripts": [
    "node_modules/ngx-blockly/scripts/blockly/blockly_compressed.js",
    "node_modules/ngx-blockly/scripts/blockly/blocks_compressed.js",
    "node_modules/ngx-blockly/scripts/blockly/python_compressed.js",
    "node_modules/ngx-blockly/scripts/blockly/msg/js/en.js",
]
`

from ngx-blockly.

WieFel avatar WieFel commented on June 15, 2024

Thanks for the answer, but I already added exactly those 4 lines to my angular.json file, as it is described in the setup section.

Could there be any other reason for the problem?

from ngx-blockly.

roroettg avatar roroettg commented on June 15, 2024

This is strange. I can only reproduce this error when the blockly javascript files are missing.

Can you conform that these files are present at runtime?

from ngx-blockly.

WieFel avatar WieFel commented on June 15, 2024

It seems that the problem is related to another error message, which is appearing before the error mentioned above:

blockly_compressed.js:143 Uncaught TypeError: Cannot read property 'navigator' of undefined
    at Object.goog.labs.userAgent.util.getNavigator_ (blockly_compressed.js:143)
    at Object.goog.labs.userAgent.util.getNativeUserAgentString_ (blockly_compressed.js:143)
    at blockly_compressed.js:143

Probably, the imports of the scripts fail because of this error, as blockly_compressed.js is the first imported script.
I tried to reproduce the error in a freshly setup Angular 8 project. But there, ngx-angular works without any problems.

However, I still can't find out what the problem is in this case. Have you maybe got an idea?

from ngx-blockly.

roroettg avatar roroettg commented on June 15, 2024

Without further knowledge about your project I cannot really suggest anything else. You probably have already tried to clear your node_modules and to reinstall the package?

from ngx-blockly.

WieFel avatar WieFel commented on June 15, 2024

Yes, I have tried that. Well, I keep trying and I will post the solution here if I find one.

from ngx-blockly.

roroettg avatar roroettg commented on June 15, 2024

I will close this for now. If you can find a solution or a way for me to reproduce this issue, you can reopen it.

from ngx-blockly.

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.