akanix42 / meteor-css-modules

MIT License
92 stars 19 forks source link

Cannot work with meteor 1.6-alpha.0 #102

Closed shenrenguo closed 6 years ago

shenrenguo commented 7 years ago

Today, I upgrade to 2.7.3 from 2.7.1 , then the following errors were encountered.

`=> Running Meteor from a checkout -- overrides project version (Meteor 1.4.4.2) ...

=> Started proxy. => Errors prevented startup:

While processing files with nathantreid:css-modules (for target web.browser): native: Constructor Map requires 'new' at FileMap.Map (native) at new FileMap (packages/mss/css-modules-build-plugin.js:24:5) at CssModulesBuildPlugin.processFilesForTarget (packages/mss/css-modules-build-plugin.js:65:24)`

My env: mac osx 10.12.6 Beta meteor wip-upgrade-to-node-6 react-toolbox@2.0.0-beta.12

akanix42 commented 7 years ago

We're not receiving this error on Meteor 1.5, so my guess would be that this is a bug in the Meteor beta that you're using. Are you able to try this with 1.5? If the beta is the issue, you'll want to report it on the Meteor repo.

shenrenguo commented 7 years ago

@nathantreid , I try this with 1.5, it works correct. But with 1.6-apha.0, it reports above error.

which is the source of the problem? I have report it in meteor repo.

arggh commented 6 years ago

@nathantreid , out of curiosity, are you expecting Meteor folks to fix Meteor, or are Meteor folks expecting for CSS-Modules to get fixed?

akanix42 commented 6 years ago

I plan to release a fix for this soon. I'm hoping it's as simple as pulling in the es6-map package from npm instead of extending the built-in Map.

akanix42 commented 6 years ago

Ben has posted a suggestion (https://github.com/meteor/meteor/issues/8749#issuecomment-336243269) for making this work without any changes (publishing a beta using the 1.6 release) but I'm currently stuck waiting on meteor/meteor#9203. Once that's fixed, I'll get a beta out.

akanix42 commented 6 years ago

Per Ben's recommendation I've published nathantreid:css-modules@2.8.0-beta.0 using the Meteor 1.6 rc. I haven't yet had the opportunity to test the package, but the only change was removing the Meteor version restrainsts (since I was publishing using the release candidate).

arggh commented 6 years ago

Doesn't seem to work.

I updated Meteor to 1.6-rc.16 and nathantred:css-modules to 2.8.0-beta.0, still get this:

=> Started proxy.                             
=> Errors prevented startup:                  

   While processing files with nathantreid:css-modules (for target web.browser):
   <anonymous>: Constructor Map requires 'new'
   at FileMap.Map (<anonymous>)
   at new FileMap (packages/mss/css-modules-build-plugin.js:24:5)
   at CssModulesBuildPlugin.processFilesForTarget (packages/mss/css-modules-build-plugin.js:65:24)
joedeleeuw commented 6 years ago

@nathantreid any update on this? I'm getting the constructor Map exception on the official 1.6 Release.

neoromantic commented 6 years ago

Same here, this is stopping me from update to 1.6, and that's not good :(

akanix42 commented 6 years ago

This issue has been fixed in v2.8.0. Not sure why it didn't work when I published using the rc, but this time I published with the 1.6 release and now Meteor no longer errors when loading the package.

arggh commented 6 years ago

Thank you! 👍

OZhurbenko commented 6 years ago

This issue appeared for me again in the 2.8.1 with Meteor 1.6.0.1. Downgraded the package to 2.8.0 and it started working again. cc @nathantreid

akanix42 commented 6 years ago

@OZhurbenko Since supporting Meteor 1.6 is a breaking change, I've published v3.0.0 for Meteor 1.6+. The 2.x branch will continue to support Meteor 1.5.

OZhurbenko commented 6 years ago

Well, I have Meteor 1.6.0.1.

When I run: meteor update nathantreid:css-modules it shows me: nathantreid:css-modules upgraded from 2.8.0 to 2.8.1 ... and 2.8.1 breaks the build.

Although changing it manually to either 3.0.0 or 2.8.0 worked for me. Thanks!

akanix42 commented 6 years ago

Ah, yes. meteor update won't automatically jump to v3.0.0 because it's a major version change. There's a command line switch you can use to have it update anyway, but I'm not sure what it is offhand.