Closed yched closed 5 years ago
Thanks, that reply probably does hold the solution. I'll take a look at this as soon as I can.
Any update on this issue ? It's quite annoying because workaround (go back to 3.1.4) does not work for me and very time I update a style file I have to make a change to a JS file otherwise I get this error.
meteor 1.8
I've just published nathantreid;css-modules@3.2.3-alpha.1
which should hopefully resolve the Babel error (I can't reproduce it for some reason). Please let me know if it works.
However, while testing it I ran into the issue @monkeydri described. This looks like a separate issue, so I've created an issue for it: #125.
@nathantreid tried 3.2.3-alpha.1 with both Meteor 1.8.0.1 and 1.8.0.2 : still get the error :-/
Compiling undefined with meteor-babel without a cache
[object Object]
at Object.exports.compile (/home/yves/.meteor/packages/nathantreid_css-modules/.3.2.3-alpha.1.1ovbuwl.tzyam++os+web.browser+web.browser.legacy+web.cordova/plugin.mss.os/npm/node_modules/meteor/babel-compiler/node_modules/meteor-babel/index.js:79:15)
I finally had time to set up Linux for testing and was able to reproduce this. Please try nathantreid:css-modules@3.2.3-beta.3
. It seems to have resolved the issue for me.
@nathantreid trying nathantreid:css-modules@3.2.3-beta.3 on our Meteor 1.8.0.2 app produces this message with 'meteor run' :
The version of @babel/runtime installed in your node_modules directory
(7.2.0) contains a breaking change which was introduced by
https://github.com/babel/babel/pull/8266. Please either downgrade by
running the following command:
meteor npm install --save-exact @babel/runtime@7.0.0-beta.55
or update to the latest beta version of Meteor 1.7.1, as explained in
this pull request: https://github.com/meteor/meteor/pull/9942.
AFAIR, that was a message displayed a couple months ago by Meteor 1.7, that was only compatible with @babel/runtime 7 beta <= 55. However, this is no longer an issue in Meteor 1.8, so I'm a bit surprised to see that message pop up again when trying your 3.2.3-beta.3 ?
After displaying the message, the app boots correctly, but styles are pretty broken : Local (module) styles seem to be applied correctly, but our global SASS files seem discared (they are correctly included with v3.1.4, using the 'enableSassCompilation' and 'passthroughPaths' options)
I'll look into the global SASS files issue. I'm guessing the babel complaint is because I'm building the plugin using Meteor 1.7. If I build it with Meteor 1.8, it doesn't work at all: https://github.com/meteor/meteor/issues/10421
@yched I've fixed the issues I was experiencing with Meteor 1.8, please try nathantreid:css-modules@4.0.0
.
@nathantreid Yep, no more warnings on meteor run, and the app builds fine :+1:
Global SASS styles are still missing though. Do you need me to open a separate issue for that ?
@yched If you could that'd be great. If you can provide a reproduction repo, even better. If not I'll try just adding css modules plus scss to the basic meteor create
app and see what that gets me.
When building the meteor app (Meteor 1.8 / meteor-css-modules 3.2.0), I get the following error :
Things seem to work fine with version 3.1.4 (even with meteor 1.8)
Maybe this reply by @benjamn could be relevant ?