solito: Error Cannot use import statement outside a module - expo-router template
Hi Fernando, I’m getting the following error when running any of the latest template, any idea what could be the issue?
Steps to reproduce:
1 - npx create-solito-app@latest my-solito-app -t with-expo-router
2 - cd my-solito-app
3 - yarn
4 - yarn web
5 - Navigate to localhost:3000
error - /Users/{user}/source/repos/my-solito-app/node_modules/react-native/index.js:14
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^
SyntaxError: Cannot use import statement outside a module
Cheers
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 45 (23 by maintainers)
Commits related to this issue
- fixed issue #356 for with-tailwind example — committed to mnishihan/solito by mnishihan a year ago
- fixed issue #356 for with-nativewind template — committed to mnishihan/solito by mnishihan a year ago
Closing this out as it’s fixed now. See the release notes here if you’d like: https://github.com/nandorojo/solito/releases/tag/v3.1.1
sorry i know this is frustrating, but not at the moment. the version is only of the CLI, not of the example itself. can you try adding
nativewind
to yourtranspilePackages
?the blank template works for what it’s worth, so that’s a good reference
i managed to reproduce it, i’ll have to see what’s up later