#Module parse failed Unexpected token

6 messages · Page 1 of 1 (latest)

earnest lotus
#

I recently upgraded DownshiftJS to 7.0.0, but it's breaking Storybook:

ERROR in ./node_modules/downshift/dist/downshift.esm.js 2598:27
Module parse failed: Unexpected token (2598:27)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|       props: latestProps
|     } = latest.current;
>     const item = itemProp ?? items[indexProp];
|     const index = getItemIndex(indexProp, item, latestProps.items);
|     const itemHandleMouseMove = () => {

I don't have any custom Webpack configuration for Storybook, and I don't know if I need any to solve this.

viscid path
#

What version of SB are you using?

earnest lotus
#
"@storybook/addon-essentials": "^6.5.13",
"@storybook/addon-links": "^6.5.13",
"@storybook/react": "^6.5.13",
"@storybook/storybook-deployer": "^2.8.16",
viscid path
#

you might try upgrading to the latest prerelease

npx sb@next upgrade --prerelease
earnest lotus
#

The pre-release version worked, as far as I can see, though I did have to add @storybook/preset-typescript because it was erroring out on import type. Still need to go through all of my stories to make sure things are all okay, but at least the page loads now. Thanks.

viscid path
#

OK, not sure what's going on with 6.5, but hopefully the prerelease is a suitable workaround. Hopefully we've gotten in most of the major changes and it will be mostly stabilizing from here on out