nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 181 forks source link

Module parse failed: Unexpected token from Dripsy Scrollview #178

Closed META-DREAMER closed 2 years ago

META-DREAMER commented 2 years ago

Using pnpm with expo router example.

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Disabled SWC as replacement for Babel because of custom Babel configuration "babel.config.js" https://nextjs.org/docs/messages/swc-disabled
info  - automatically enabled Fast Refresh for 1 custom loader
info  - Using external babel configuration from /Users/md/Dev/md-wtf/apps/next/babel.config.js
error - ../../packages/app/node_modules/@dripsy/core/build/components/ScrollView.js
Module parse failed: Unexpected token (10:12)
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
|     const containerSx = props.contentContainerSx && sx(props.contentContainerSx);
|     const indicatorSx = props.indicatorSx && sx(props.indicatorSx);
>     return (<DripsyScrollView {...props} contentContainerStyle={props.contentContainerStyle && containerSx
|             ? [props.contentContainerStyle, containerSx]
|             : containerSx || props.contentContainerStyle} indicatorStyle={props.indicatorStyle && indicatorSx

CleanShot 2022-10-07 at 19 59 39

nandorojo commented 2 years ago

can you remove @dripsy/core from your package.json and run yarn? that shouldn’t be there

nandorojo commented 2 years ago

It works fine for me with the latest solito starter template. Could you share your reproduction, or try npx create-solito-app@latest?