meteor-vue / vue-meteor

🌠 Vue first-class integration in Meteor
897 stars 112 forks source link

After upgrading to Meteor 1.8 and Akryum:vue-router2@0.2.2 sourcemap error #336

Open jamesgibson14 opened 6 years ago

jamesgibson14 commented 6 years ago

Errors prevented startup:

While processing files with akryum:vue-router2 (for target web.browser):

/Users/jamesgibson/.meteor/packages/akryum_vue-router2/.0.2.2.3d8cvj.f7f9++os+web.browser+web.browser.legacy+web.cordova/plugin.vue-router.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/core/lib/config/validation/options.js:123:11: .sourceMap is an alias for .sourceMaps, cannot use both at assertNoDuplicateSourcemap

GeneralAldo commented 6 years ago

Any way to get around this?

mwarren2 commented 5 years ago

Take look at this babel fix: https://github.com/babel/babel-loader/pull/670

This makes me think that the problem is on line 41 of the vue-router2 plug-in: https://github.com/meteor-vue/vue-meteor/blob/master/packages/vue-router2/plugin/plugin.js

babelOptions.sourceMap = true

should presumably be changed to

babelOptions.sourceMaps = true


However after making above change it then fails with another message:

Using removed Babel 6 option: .sourceMapTarget - The sourceMapTarget option has been removed because it makes more sense for the tooling that calls Babel to assign map.file themselves.

So I also removed the line: babelOptions.sourceMapTarget = babelOptions.filename + '.map'

It now compiles correctly

mwarren2 commented 5 years ago

Would be nice if this was fixed soonest.

Otherwise we are still stuck with Meteor 1.7

Thanks !

rekDen commented 5 years ago

Hey mwarren2,

my team mate @ahmelkady and me figured it out how to temporarily "solve" this issue. For us it worked to downgrade akryum_vue-router2 from 0.2.2 to 0.2.0 by changing manually the .meteor/versions file.

Best regards

mwarren2 commented 5 years ago

@rekDen Good idea. I'll downgrade until the problem is fixed

mwarren2 commented 5 years ago

@Akryum Any chance of this being fixed? It looks like a simple fix yet It is forcing us to stay with Meteor 1.7.

Please see my comments further up this page. I have outlined what I think needs to be done. I have forked vue-router2 and tested the changes and it all works, however I appreciate that obviously I don't have your expertise...

Many thanks.

rpesciotta commented 5 years ago

Just to +1 this, I'm a new user to the vue/meteor combination (although working with meteor for ~3 years), and starting a project with meteor 1.8 and the akryum set of packages to enable this integration, and right at the beginning, run into this issue. I'd be glad to see this fixed soon too. Thanks in advance!

mwarren2 commented 5 years ago

I've replaced akryum:vue-router2 with vue-router. Though I'm still using other akryum vue code.

sebbean commented 5 years ago

hey @mwarren2 what do you mean by replaced?

in which file?

wildhart commented 5 years ago

@sebbean:

meteor remove akryum:vue-router2
meteor npm install --save vue-router

I've never used the akryum version, standard vue-router works perfectly well with Meteor 1.8

mwarren2 commented 5 years ago

hey @mwarren2 what do you mean by replaced?

in which file?

Please see @wildhart answer

jamesgibson14 commented 4 years ago

I just updated to Meteor 1.8.3 and used @wildhart 's suggestion to use the npm package directly. I had to change of view things to migrate, like importing the path/route components directly, and changing a a few other lines of code, but it seems to be working very well now.