Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flexbox opened this issue May 16, 2022 · 3 comments

Comments

@flexbox
Copy link

flexbox commented May 16, 2022

Steps to repoduce:

  1. clone the repo
  2. cd universal-app-template-nativebase-typescript
  3. yarn
  4. yarn start:web
❯ node --version
v16.13.1

http://localhost:3000/ renders this error

Server Error

SyntaxError: Cannot use import statement outside a module

image

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

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

@LouGhys
Copy link

LouGhys commented May 24, 2022

Bump

@Wilson-Lim
Copy link

any fix for this ?

@flexbox
Copy link
Author

flexbox commented Aug 21, 2022

Maybe it's fixed with the last release of react-native-web 0.18?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants