meteor-mdl icon indicating copy to clipboard operation
meteor-mdl copied to clipboard

Zodiase-mdl not working on client after 1.7

Open Angular-Angel opened this issue 6 years ago • 2 comments

I have the zodiase-mdl.json file in my project, and it even seems to process on the server side, but the client resolutely refuses to acknowledge it. Am I supposed to import it somehow? I did start a new project because I couldn’t solve another problem on update, so maybe my package.json is different now in some way that prevents it from being processed on the client. :/

Angular-Angel avatar Jun 09 '18 21:06 Angular-Angel

Huh. I tried including a theme in the zodiase-mdl.json file, and it worked. I'm still getting errors about "MDl disabled. Create a file named 'zodiase-mdl.json' at the root of the app to enable." in the console though, and my "mdl-layout__content" div isn't expanding to use the whole screen anymore like it used to. :/

Angular-Angel avatar Jun 10 '18 01:06 Angular-Angel

I ran into this problem this week as well, while taking a really large upgrade from Meteor 1.4.x to 1.10. While upgrading I adopted the notion to add a package.json in the meteor project's root. (As my project really started back with Meteor 0.8 or so, it did not have all those things, and it felt the right thing to do.)

Now, starting with Meteor 1.7 a feature was introduced, to explicitly state what parts the server and client should load for starting purposes in package.json - so I did that as well. What I did not know is, that using this disables the default loading sequence. See also here.

The reason this is important, is in the way the compiler plugin of zodiase-mdl works. To inject the settings one puts in into <projectRoot>/zodiase-mdl.json, the compiler wraps the contents in a javascript snippet which gets generated into client/lib/settings-file-checked.generated.js

With the default loading sequence disabled as explained above, it means the generated file(s) are no longer loaded, and we end up with the dreaded client side error messsage regarding the missing configuration.

Workaround for me currently is to remove the meteor.mainModule section from package.json. This brings back to normal. (And, now after having gone to the bottom of all this, i'd like the last 48h of my life back :) )

@Zodiase any chance for putting a remark on the page, or even better a fix for the package to make it compatible with the meteor.mainModule specification?

GrimmiMeloni avatar Mar 30 '20 19:03 GrimmiMeloni