Coder Social home page Coder Social logo

Comments (8)

WalterNorthwoods avatar WalterNorthwoods commented on May 21, 2024

In looking at the v14 "Does NOT work" sample in Stackblitz, I notice that the package.json file has this:

    "gojs": "^2.2.12",
    "gojs-angular": "^2.0.4",

but the package-lock.json file has this:

    "gojs": {
      "version": "2.1.42",
      "resolved": "https://registry.npmjs.org/gojs/-/gojs-2.1.42.tgz",
      "integrity": "sha512-PurmYw8Uefl9UbqjLl2MwwYRRwq4RsgcfGQWawgPfngQU5IFSopJNNsNZ9V/B+DlTUa6b21f3NFpslp19moOjQ=="
    },
    "gojs-angular": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/gojs-angular/-/gojs-angular-2.0.0.tgz",
      "integrity": "sha512-PG2CzOr3a5ax77NoOaK/z4rES1SLriH5h9TwL1p6hrem7O/5BKju6JzOQyaC1twJRSOOwLyvabOp4IuiWBayRA==",
      "requires": {
        "immer": "^9.0.1",
        "tslib": "^2.0.0"
      }
    },

Could you please explain how this is possible? If you fix the dependencies, do things work better?

from gojs-angular.

SigmaOutdoors avatar SigmaOutdoors commented on May 21, 2024

from gojs-angular.

SigmaOutdoors avatar SigmaOutdoors commented on May 21, 2024

In order to make things better organized, I have renamed the projects and and they are available here:

https://stackblitz.com/@SigmaOutdoors


Angular GoJs Example 12.2.5 - Works                       // Working example, upgraded and working as far as Angular 12.2.5

Angular GoJs Example Upgrade to 14.x - Compile Error      // 12.2.5 Example upgraded to 14+ : Error in src/app/app.module.ts (18:5)  'GojsAngularModule' does not appear to be an NgModule class.

Sigma GoJs Angular v14+ - Compile Error                   // 14+ A different example that works locally but not on StackBlitz  : Error in src/app/app.module.ts (18:5)  'GojsAngularModule' does not appear to be an NgModule class.

from gojs-angular.

WalterNorthwoods avatar WalterNorthwoods commented on May 21, 2024

Hmmm. I'm sorry, but I have been unable to figure out exactly which files are being loaded in Stackblitz. I noticed that an incompatibility of Angular 14 compared with Angular 12 is that ES modules are now the default, not UMD modules. But I couldn't find the actual file that it loaded for GoJS to see whether it loaded "go.js" or "go-module.js". If it's actually using ES modules, you'll need to use "go-module.js".

Note that the package.json for GoJS includes this setting:

  "module": "release/go-module.js",

But maybe that's not enough for the Angular environment?

from gojs-angular.

SigmaOutdoors avatar SigmaOutdoors commented on May 21, 2024

It sounds like you're on to something, I tried going back a bit in my tsconfig but get the same error. I have provided the valid values in comments below I didn't really see anything about UDM...


"moduleResolution": "Classic",
    "importHelpers": true,
    "target": "es2015",
    "module": "es2015",
    "lib": [
      "es2015",
      "dom"
    ]
  }
}

/*  target & module : 
 Valid values: "ES5", "ES6", "ES2015", "ES2015.Collection", "ES2015.Core", "ES2015.Generator", "ES2015.Iterable", "ES2015.Promise", "ES2015.Proxy", "ES2015.Reflect", "ES2015.Symbol.WellKnown", "ES2015.Symbol", "ES2016", "ES2016.Array.Include", "ES2017", "ES2017.Intl", "ES2017.Object", "ES2017.SharedMemory", "ES2017.String", "ES2017.TypedArrays", "ES2018", "ES2018.AsyncGenerator", "ES2018.AsyncIterable", "ES2018.Intl", "ES2018.Promise", "ES2018.Regexp", "ES2019", "ES2019.Array", "ES2019.Object", "ES2019.String", "ES2019.Symbol", "ES2020", "ES2020.BigInt", "ES2020.Promise", "ES2020.String", "ES2020.Symbol.WellKnown", "ESNext", "ESNext.Array", "ESNext.AsyncIterable", "ESNext.BigInt", "ESNext.Intl", "ESNext.Promise", "ESNext.String", "ESNext.Symbol", "DOM", "DOM.Iterable", "ScriptHost", "WebWorker", "WebWorker.ImportScripts", "Webworker.Iterable", "ES7", "ES2021", "ES2020.SharedMemory", "ES2020.Intl", "ES2021.Promise", "ES2021.String", "ES2021.WeakRef", "ESNext.WeakRef", "es2021.intl", "ES2022", "ES2022.Array", "ES2022.Error", "ES2022.Intl", "ES2022.Object", "ES2022.String".(1)

 #
moduleResolution : "Classic", "Node", "Node16", "NodeNext".

*/

from gojs-angular.

SigmaOutdoors avatar SigmaOutdoors commented on May 21, 2024

from gojs-angular.

WalterNorthwoods avatar WalterNorthwoods commented on May 21, 2024

To clarify, the GoJS library has no dependencies on any library or framework, other than the HTML DOM and JavaScript that the browser provides. The gojs-angular components in this repository indeed depend on Angular, currently version 11.

We were able to reproduce your problem with Stackblitz after upgrading this gojs-angular project to Angular 14. Everything is fine when running locally, without Stackblitz.

Always keeping up with the latest version can harm most people who just want to use a stable version.

Good luck with the Stackblitz team.

from gojs-angular.

SigmaOutdoors avatar SigmaOutdoors commented on May 21, 2024

We were able to reproduce your problem with Stackblitz after upgrading this gojs-angular project to Angular 14. Everything is fine when running locally, without Stackblitz.

This is good to know, thank you for trying that.

Always keeping up with the latest version can harm most people who just want to use a stable version.

Agreed, sort of. That's why there are versions, if people want to sit on a 2.5 year old version, that is then their choice. Others shouldn't have to be penalized with that choice, as I said Angular moves fast. As we agreed, your package should work for a while, but the rate at which Angular updates, I wouldn't want to be 3 versions behind (as a developer).

from gojs-angular.

Related Issues (14)

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.