GeekyAnts / GeekyAnts/nativebase-templates

`universal-app-template-nativebase-typescript` build error with `yarn start:web`

Open
#47 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
73
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Steps to repoduce:
1. clone the repo
1. cd universal-app-template-nativebase-typescript
1. yarn
1. yarn start:web

```
❯ node --version
v16.13.1
```

http://localhost:3000/ renders this error

```console
Server Error

SyntaxError: Cannot use import statement outside a module
```
![image](https://user-images.githubusercontent.com/360936/168636561-7ade8430-420a-4924-8602-979bb652fa04.png)

I have a feeling it's related to `webpack` / `react-native-web` config because this is my terminal outputs this:

```console
event - compiled successfully
event - build page: /
wait - compiling...
event - compiled successfully
event - build page: /next/dist/pages/_error
wait - compiling...
event - compiled successfully
/Users/cerebra/workspace/tmp/nativebase-templates/universal-app-template-nativebase-typescript/node_modules/react-native-web/dist/exports/StyleSheet/createCompileableStyle.js:11
import normalizeValueWithProperty from './normalizeValueWithProperty';
^^^^^^

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)
```

![image](https://user-images.githubusercontent.com/360936/168636958-2123e24b-2963-4ec0-92e0-0c35e3a48bb7.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.