svelte-material-ui icon indicating copy to clipboard operation
svelte-material-ui copied to clipboard

segmented-button is reporting a syntax error.

Open michaelcuneo opened this issue 2 years ago • 6 comments

Describe the bug segmented-button is reporting a syntax error.

To Reproduce Steps to reproduce the behavior: npm i @smui/segmented-button --save-dev npm run prepare npm run dev -- --host --port 3000

Implement segmented-button.

Uncaught SyntaxError: The requested module '/node_modules/@material/segmented-button/dist/mdc.segmentedButton.js?v=963b7288' does not provide an export named 'MDCSegmentedButtonFoundation' (at SegmentedButton.svelte? [sm]:28:18)

Expected behavior Functional Buttons

michaelcuneo avatar Aug 23 '22 03:08 michaelcuneo

This is basically a two bad ways to do it situation, because the upstream segmented button package.json is broken. Are you able to pin it to v6.1.1 until v7 comes out?

hperrin avatar Aug 23 '22 03:08 hperrin

Ahh, so just throw an @material/segmentedbutton: "v6.1.1" and rm -r node_modules package-lock.json | npm i @material/segmentedbutton...

michaelcuneo avatar Aug 23 '22 03:08 michaelcuneo

I've just got back to the office to have a play around with this, and it's not working.

I tried adding @material/segmented-button: v6.1.1 to the config, and no such version exists, so I figured maybe you meant your @smui/segmented-button to v6.1.1 so I reinstalled, and it's still dead.

@smui/segmented-button: v6.1.1 still breaks. I tried clamping to v6.0.0 and it's still broken.

michaelcuneo avatar Aug 25 '22 01:08 michaelcuneo

Having the same problem...

shadowempire123 avatar Aug 25 '22 06:08 shadowempire123

@shadowempire123 I fixed it eventually... it seems that 6.1.1 is missing and won't install... if it is still in existence my computer is being crap and won't find it... so I just went one lower, and ran npm i @smui/[email protected] -D ... and everything is back to normal.

michaelcuneo avatar Aug 25 '22 08:08 michaelcuneo

@michaelcuneo, thx that works for me!

shadowempire123 avatar Aug 25 '22 10:08 shadowempire123

I believe I've figured out how to fix this permanently.

hperrin avatar Apr 24 '23 22:04 hperrin