GeekyAnts / GeekyAnts/NativeBase

Nativebase + Expo 48 + Solito + NextJS 13 - failing to load in web

Open
#5,718 7 comments 2 reactions 0 assignees View on GitHub
bug triage v3
Dominant language
TypeScript
Stars
20.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Description

Nativebase components dont work with Next 13

### CodeSandbox/Snack link

NA

### Steps to reproduce

1. Create a sample Solito App (`npx create-solito-app`)
2. Install Nativebase
3. Components work for Expo 48
4. Components fail for Next 13
5. Tried to use `npx create-next-app` with the same Nativebase + Next 13 & getting this compilation error:

```
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^

SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
```

### NativeBase Version

3.4.28

### Platform

- [ ] Android
- [ ] CRA
- [ ] Expo
- [ ] iOS
- [X] Next

### Other Platform

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.