Clarity: Error: (SystemJS) module is not defined on angular 4 project (without using angular cli)

Created on 1 Apr 2017  路  8Comments  路  Source: vmware/clarity

Select one ... (check one with "x")

[x] bug
[ ] feature request
[ ] enhancement

Expected behavior


After creating an angular quick start project with this template (https://github.com/angular/quickstart), and installing all the npm pckgs as described in the documentation, angular application should start properly. I'm not using the angular CLI, but systemjs.

Actual behavior

I'm getting an Error like this:

Error: (SystemJS) module is not defined
    ReferenceError: module is not defined
        at eval (http://localhost:3000/node_modules/clarity-angular/clarity-angular.umd.js:5964:31)
        at Object.eval (http://localhost:3000/node_modules/clarity-angular/clarity-angular.umd.js:6005:2)
        at Object.eval (http://localhost:3000/app/app.module.js:10:25)
        at eval (http://localhost:3000/app/app.module.js:32:4)
        at eval (http://localhost:3000/app/app.module.js:33:3)
        at eval (<anonymous>)
    Evaluating http://localhost:3000/app/app.module.js
    Evaluating http://localhost:3000/main.js
    Error loading http://localhost:3000/main.js
        at eval (http://localhost:3000/node_modules/clarity-angular/clarity-angular.umd.js:5964:31)
        at Object.eval (http://localhost:3000/node_modules/clarity-angular/clarity-angular.umd.js:6005:2)
        at Object.eval (http://localhost:3000/app/app.module.js:10:25)
        at eval (http://localhost:3000/app/app.module.js:32:4)
        at eval (http://localhost:3000/app/app.module.js:33:3)
        at eval (<anonymous>)
    Evaluating http://localhost:3000/app/app.module.js
    Evaluating http://localhost:3000/main.js
    Error loading http://localhost:3000/main.js

Is basically complaining about this line of code:

WizardPage.decorators = [
        { type: _angular_core.Component, args: [{
                    moduleId: module.id, //source of the error

If I comment out the 5 times that this appears then everything looks fine, what am I missing?

Environment details

  • Angular version: 4.0.X

  • Clarity version: Latest

  • OS and version: Windows 10

  • Browser: all

bug

Most helpful comment

@biapar , @Jinnie , @Thomas772 , @luis-cortina : This appears (at least from the plunkr) to be an issue with pulling in the 0.9.0-alpha.1 release. So if your npm packages are set to pull latest or anything greater than 0.8, I recommend changing your package.json to...

"clarity-angular": "~0.8.13",
"clarity-ui": "~0.8.13",
"clarity-icons": "~0.8.13",

...for now. I will get the issue with 0.9.0-alpha.1 addressed sometime today and try to have alpha.2 out very soon.

Sorry for the inconvenience.

All 8 comments

Me too...the same problem with latest angular cli

image

Also getting the same error.

Same happens with the plunker template (and all old plunks)
https://plnkr.co/edit/8TwwdL?p=preview

Some news?

@biapar , @Jinnie , @Thomas772 , @luis-cortina : This appears (at least from the plunkr) to be an issue with pulling in the 0.9.0-alpha.1 release. So if your npm packages are set to pull latest or anything greater than 0.8, I recommend changing your package.json to...

"clarity-angular": "~0.8.13",
"clarity-ui": "~0.8.13",
"clarity-icons": "~0.8.13",

...for now. I will get the issue with 0.9.0-alpha.1 addressed sometime today and try to have alpha.2 out very soon.

Sorry for the inconvenience.

@biapar , @Jinnie , @Thomas772 , @luis-cortina : This should be fixed now with the 0.9.0-alpha.2 publish.

I do recommend not running your production apps off of alpha. But if you need to use alpha to work on the new wizard ( #156 ) then you should be able to do so now.

So, Is't possibile to use NG4?

Hi there 馃憢, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

Was this page helpful?
0 / 5 - 0 ratings