angularice

Using ICE in Angular 10


I'm trying to use zeroC ICE in my Angular 10 application. Just created a simple helloworld Angular app and installed ice with "npm install ice" Then I invoke "Ice.initialise()" but I receive the following error:

ModuleRegistry.js:25 Uncaught TypeError: m.require is not a function
    at ModuleRegistry.js:25
    at Array.forEach (<anonymous>)
    at Function.require (ModuleRegistry.js:23)
    at Object.<anonymous> (Ice.js:7)
    at Object../node_modules/ice/src/Ice/Ice.js (Ice.js:45)
    at __webpack_require__ (bootstrap:79)
    at Object../node_modules/ice/src/index.js (index.js:5)
    at __webpack_require__ (bootstrap:79)
    at Module../src/app/app.component.ts (main.js:109)
    at __webpack_require__ (bootstrap:79)

Solution

  • I've posted the same question on ICE git.

    Basically you need to:

    And here is the detailed solution:

    https://github.com/zeroc-ice/ice/issues/1039