Fails to fine tune compilation react-native-paper, remotion & react-native-web
See original GitHub issueCurrent behaviour
react-natie-web & remotion setup fails to compile web version.
Expected behaviour
Compiling nicely.
How to reproduce?
- Clone https://github.com/RohovDmytro/love-death-react
- 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 |
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
I am getting error, while implementing react-native-paper on ...
After copied PaperProvider I am getting these error.. ERROR in ./src/index.tsx Module not found: Error: Can't resolve 'MaterialCommunityIcons.
Read more >This Week In React #113: React source code, SOLID, Remix ...
It can help your app to start faster via a pre-compilation in bytecode. With React-Native 0.70 (now in release candidate), Hermes is enabled...
Read more >sitemap_video.xml - Telerik
KendoReact is a commercial, native (built for React from the ground up) UI ... web functional tests to decrease the risk of script/environment...
Read more >GitNation People - JavaScript experts, mentors and speakers
Chris is a software developer and independent consultant. He's created web and mobile apps using mostly React and React Native, with Node or...
Read more >Syntax - Tasty Web Development Treats - Podcast Addict
Syntax - Tasty Web Development Treats - via Podcast Addict | Full Stack ... has SDKs for your favorite frameworks like React, Next.js,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Root issue found.
So the webpack config must also contain the
web.js
item AND it should be on top of the list:It is important to have
web.js
on top of the array so the libraries (suck as react-native-paper) will prioritize loading web.js files.Totally worthy adding this to the web support section: https://callstack.github.io/react-native-paper/using-on-the-web.html
If you will have some more findings related to that topic, please collect them in that issue. Currently, I’m busy with other things, so I won’t be able to dive into that area, but the issue will remain open.