Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: module is not defined #35

Open
mbretschn opened this issue Feb 24, 2016 · 8 comments
Open

Uncaught ReferenceError: module is not defined #35

mbretschn opened this issue Feb 24, 2016 · 8 comments
Assignees

Comments

@mbretschn
Copy link

I just generated a material-app following the guide in the README.
I managed to start the server but then i get an error in the client.

Uncaught ReferenceError: module is not defined
(anonymous function) @ index.js:1

Uncaught SyntaxError: Unexpected token e
fromJson @ angular.js:1272

Any Idea what is going wrong?

@Stupidism Stupidism reopened this May 24, 2016
@Stupidism
Copy link
Collaborator

Stupidism commented May 24, 2016

I located it.
This error happens in material-design-icons/index.js which has three lines of code:

module.exports = {
  STATIC_PATH: __dirname,
};

Any idea of what's happening?@michaelkrone

@michaelkrone
Copy link
Owner

I could only reproduce this once with an invalid jwt token, responding with the exception stack trace. Clearing the browser cache solved it, since then I was not able to produce this error. This is related to the fromJson error.

Seems like @3epnm ran into this with a new generated app

However, the Material icons index.js should not be included in the client sources, there is no global module in client environments.

@michaelkrone
Copy link
Owner

Cannot access the sources right now, will check later

@Stupidism
Copy link
Collaborator

Stupidism commented May 24, 2016

I had this module is not defined error all the time but I didn't pay attention to it.
Because it isn't causing anything bad except this error itself.

@michaelkrone
Copy link
Owner

Both errors (fromJson and Module)?

@michaelkrone michaelkrone self-assigned this May 24, 2016
michaelkrone pushed a commit that referenced this issue May 24, 2016
michaelkrone pushed a commit that referenced this issue May 24, 2016
@michaelkrone
Copy link
Owner

This can be closed if develop is merged into master the next time.

@halbano
Copy link

halbano commented Feb 27, 2018

Having this issue too. Which is possible fix for this?

@Stupidism
Copy link
Collaborator

@halbano This repo is not maintained any more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants