aurelia-materialize-bridge: TypeError: Cannot redefine property: isSelected

I continually get this error on Chrome. Any ideas?

I’m using Aurelia CLI, following these instructions

DEBUG [aurelia] Loading plugin aurelia-materialize-bridge.
vendor-bundle.js:1399 Unhandled rejection TypeError: Cannot redefine property: isSelected
    at Function.Object.defineProperty (polydev/vendor/zone-microtask.js:281:12)
    at _applyDecoratedDescriptor (http://localhost:9000/scripts/vendor-bundle.js:34783:36)

On Firefox I am warned:

mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

And not all fonts are loaded…

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 61 (9 by maintainers)

Most upvoted comments

Something worth noticing (for future visitors)

As @Thanood noticed, jquery was declared as a dependency twice. Fixing that did not solve the issue (although it was something that had to be fixed)

I had this bundle configuration

{
            "name": "materialize-bundle.js",
            "dependencies": [
                "jquery", {
                    "name": "materialize-css",
                    "path": "../node_modules/materialize-css/dist",
                    "main": "js/materialize.amd",
                    "deps": [
                        "jquery"
                    ],
                    "resources": [
                        "css/materialize.css"
                    ],
                    "exports": "Materialize"
                }, {
                    "name": "aurelia-materialize-bridge",
                    "path": "../node_modules/aurelia-materialize-bridge/dist/amd",
                    "main": "index",
                    "deps": [
                        "jquery"
                    ],
                    "resources": [
                        "**/*.{css,html}",
                        "index.js"
                    ]
                }
            ]
        }

I’ve replaced with this one:

{
        "name": "materialize-bundle.js",
        "dependencies": [
          {
            "name": "materialize-css",
            "path": "../node_modules/materialize-css/dist",
            "main": "js/materialize.amd",
            "deps": [
              "jquery"
            ]
          },
          {
            "name": "aurelia-materialize-bridge",
            "path": "../node_modules/aurelia-materialize-bridge/dist/amd",
            "main": "index",
            "deps": [
              "jquery"
            ],
            "resources": [
              "**/*.{css,html}"
            ]
          }
        ]
      }

Hope it helps

Wow! But I think you made some progress 😃 The investigation continues!