generator-material-app icon indicating copy to clipboard operation
generator-material-app copied to clipboard

Uncaught ReferenceError: module is not defined

Open mbretschn opened this issue 9 years ago • 8 comments

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?

mbretschn avatar Feb 24 '16 11:02 mbretschn

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

Stupidism avatar May 24 '16 15:05 Stupidism

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 avatar May 24 '16 15:05 michaelkrone

Cannot access the sources right now, will check later

michaelkrone avatar May 24 '16 16:05 michaelkrone

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.

Stupidism avatar May 24 '16 16:05 Stupidism

Both errors (fromJson and Module)?

michaelkrone avatar May 24 '16 16:05 michaelkrone

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

michaelkrone avatar May 25 '16 07:05 michaelkrone

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

halbano avatar Feb 27 '18 05:02 halbano

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

Stupidism avatar Feb 28 '18 02:02 Stupidism