react-toolbox-example icon indicating copy to clipboard operation
react-toolbox-example copied to clipboard

Install fails - won't compile -- Is this project dead?

Open Terrycoco opened this issue 7 years ago • 2 comments

ERROR in ./~/react-toolbox/components/index.js
Module build failed: SyntaxError: Unexpected token, expected { (24:7)

  22 | export { default as ProgressBar } from './progress_bar';
  23 | export * from './radio';
> 24 | export Ripple from './ripple';
     |        ^
  25 | export { default as Slider } from './slider';
  26 | export { default as Snackbar } from './snackbar';
  27 | export { default as Switch } from './switch';

 @ ./src/frontend/index.js 5:0-61
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server react-hot-loader/patch ./src/frontend/index.js
webpack: Failed to compile.

Terrycoco avatar Jun 27 '18 18:06 Terrycoco

same issue I think it dead

SDDarkBlue avatar Sep 12 '18 19:09 SDDarkBlue

I was able to compile after changing:

24 | export Ripple from './ripple'; 30 | export Tooltip from './tooltip';

to:

24 | export {default as Ripple} from './ripple'; 30 | export {default as Tooltip} from './tooltip';

If you check out the history of components/ripple/index.js you can see that it originally had a default export:

1 | export default from './Ripple';

and was later beefed-up with: 1 | import rippleFactory from './Ripple'; 2 | import theme from './theme.module.css'; 3 | 4 | export default options => rippleFactory({ ...options, theme });

If this doesn't make sense to you read this: ES6 Default vs Named imports.

...after updating the above (1) the Demo App compiles successfully, (2) runs @ http://localhost:8080, and most importantly (3) when I click the button components (armed with "Ripple") they be rippling when I be clicking. So I'd presuming that's the fix w/o looking or thinking too deeply about it.

jordanmalecki avatar Aug 01 '19 21:08 jordanmalecki