brunolemos / react-native-web-monorepo

Code sharing between iOS, Android & Web using monorepo
https://dev.to/brunolemos/tutorial-100-code-sharing-between-ios-android--web-using-react-native-web-andmonorepo-4pej
865 stars 175 forks source link

Error when build release with next.js #84

Closed lucasdidur closed 3 years ago

lucasdidur commented 3 years ago
lucasdidur in react-native-web-monorepo/packages/web-nextjs on  master 
❯ yarn build      
yarn run v1.22.10
warning package.json: No license field
$ next build
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Failed to compile.

../components/src/App.tsx:3:3
Type error: Module '"react-native"' has no exported member 'SafeAreaView'.

  1 | import React from 'react'
  2 | import {
> 3 |   SafeAreaView,
    |   ^
  4 |   ScrollView,
  5 |   StatusBar,
  6 |   StyleSheet,
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lucasdidur in react-native-web-monorepo/packages/web-nextjs on  master took 4s 
❯

How to fix this?