callstack / callstack/react-native-paper

Fails to fine tune compilation react-native-paper, remotion & react-native-web

オープン
#3,525 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug web
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
12

説明

### Current behaviour
react-natie-web & remotion setup fails to compile web version.

### Expected behaviour
Compiling nicely.

### How to reproduce?
1. Clone https://github.com/RohovDmytro/love-death-react
2. npm run build

### Preview
No screenshots.

### What have you tried so far?
I've followed the react-native-paper web guide and different variations of loaders, but still no success.

It does not work both with expo or without.

What I find strange is I do make a swap of react-native & react-native-web, but the error still persists with react-native files.

My 'uneducated guess' is react-native-paper somehow manages to load react-native files dynamically and they do not get swapped during compilation process. Not sure though.

```
3000
ERROR in ./node_modules/react-native/Libraries/Utilities/codegenNativeComponent.js 14:12
Module parse failed: Unexpected token (14:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| import requireNativeComponent from '../../Libraries/ReactNative/requireNativeComponent';
> import type {HostComponent} from '../../Libraries/Renderer/shims/ReactNativeTypes';
| import UIManager from '../ReactNative/UIManager';
```

### Your Environment

| software | version
| --------------------- | -------
| ios | x
| android | x
| react-native | 0.70.5
| react-native-paper | 5.0.0
| node | 16.16.0
| npm or yarn | x.x.x
| expo sdk | x.x.x

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Clone the linked love-death-react project and run npm run build to reproduce the failure. Start with node_modules/react-native/Libraries/Utilities/codegenNativeComponent.js and the web compilation or loader configuration; done means the web version compiles successfully without the reported module parse error.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native, typescript, webpack
領域
build-system, frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
28/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。