You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello maintainers! I’m trying to integrate react-native-filament into my React Native project (Expo SDK ) and am running into persistent errors. Below is a summary of everything I’ve done, all based on the Getting Started Guide instructions for react-native-filament. Despite carefully following each step, I still encounter issues preventing the library from working properly.
14 | import getDevServer from '../getDevServer';
15 |
16 | const manifest = Constants.expoConfig as Record<string, any> | null;
| ^
17 |
18 | function getOrigin() {
19 | if (process.env.NODE_ENV !== 'production') {
› Stopped server
(NOBRIDGE) ERROR Error: The experimental Metro feature require.context is not enabled in your project.
This can be enabled by setting the transformer.unstable_allowRequireContext property to true in your Metro configuration. [Component Stack]
(NOBRIDGE) ERROR Error: The experimental Metro feature require.context is not enabled in your project.
This can be enabled by setting the transformer.unstable_allowRequireContext property to true in your Metro configuration. [Component Stack]
(NOBRIDGE) ERROR Warning: TypeError: Cannot read property 'ctx' of undefined
This error is located at:
in App (created by ErrorOverlay)
in ErrorToastContainer (created by ErrorOverlay)
in ErrorOverlay (created by withDevTools(ErrorOverlay))
in withDevTools(ErrorOverlay)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)
(NOBRIDGE) ERROR Warning: TypeError: Cannot read property 'ctx' of undefined
This error is located at:
in App (created by ErrorOverlay)
in ErrorToastContainer (created by ErrorOverlay)
in ErrorOverlay (created by withDevTools(ErrorOverlay))
in withDevTools(ErrorOverlay)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)
› Reloading apps
iOS Bundling failed 1141ms node_modules/expo-router/entry.js (10 modules)
ERROR SyntaxError: my-app/node_modules/expo-router/build/qualified-entry.js: Support for the experimental syntax 'jsx' isn't currently enabled (20:13):
18 | // Must be exported or Fast Refresh won't update the context
19 | function App() {
If you already added the plugin for this syntax to your config, it's possible that your config isn't being loaded.
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:
npx cross-env BABEL_SHOW_CONFIG_FOR=/my-app/node_modules/expo-router/build/qualified-entry.js
See https://babeljs.io/docs/configuration#print-effective-configs for more info.
› Stopped server
iOS Bundling failed 3250ms node_modules/expo-router/entry.js (339 modules)
ERROR node_modules/expo-router/_ctx.ios.js: node_modules/expo-router/_ctx.ios.js:Invalid call at line 2: process.env.EXPO_ROUTER_APP_ROOT
First argument of require.context should be a string denoting the directory to require.
› Stopped server
iOS Bundling failed 3187ms node_modules/expo-router/entry.js (340 modules)
ERROR node_modules/expo-router/_ctx.ios.js: node_modules/expo-router/_ctx.ios.js:Invalid call at line 2: process.env.EXPO_ROUTER_APP_ROOT
First argument of require.context should be a string denoting the directory to require.
iOS Bundling failed 181ms node_modules/expo-router/entry.js (225 modules)
ERROR SyntaxError: my-app/node_modules/@expo/metro-runtime/src/location/install.native.ts: Missing semicolon. (16:37)
14 | import getDevServer from '../getDevServer';
15 |
16 | const manifest = Constants.expoConfig as Record<string, any> | null;
| ^
17 |
18 | function getOrigin() {
19 | if (process.env.NODE_ENV !== 'production') {
The text was updated successfully, but these errors were encountered:
OK, So for about 2 days I'm trying to install this and make an example to work , I have no ideea how to install it :)), I get a lot of errors and I tried also with new architecture and everything I found on the internet. I can't make it to work .
Can you please share your original metro config before you made any changes to it? As you are using expo it probably needs to be slightly different than the config you're seeing in the docs
Hello maintainers! I’m trying to integrate react-native-filament into my React Native project (Expo SDK ) and am running into persistent errors. Below is a summary of everything I’ve done, all based on the Getting Started Guide instructions for react-native-filament. Despite carefully following each step, I still encounter issues preventing the library from working properly.
Node Version : v20.18.0
app.json config
babel config :
metro config :
Package json
Errors like :
ERROR SyntaxError: my-app/node_modules/@expo/metro-runtime/src/location/install.native.ts: Missing semicolon. (16:37)
14 | import getDevServer from '../getDevServer';
15 |
(NOBRIDGE) ERROR Error: The experimental Metro feature
require.context
is not enabled in your project.This can be enabled by setting the
transformer.unstable_allowRequireContext
property totrue
in your Metro configuration. [Component Stack](NOBRIDGE) ERROR Error: The experimental Metro feature
require.context
is not enabled in your project.This can be enabled by setting the
transformer.unstable_allowRequireContext
property totrue
in your Metro configuration. [Component Stack](NOBRIDGE) ERROR Warning: TypeError: Cannot read property 'ctx' of undefined
This error is located at:
in App (created by ErrorOverlay)
in ErrorToastContainer (created by ErrorOverlay)
in ErrorOverlay (created by withDevTools(ErrorOverlay))
in withDevTools(ErrorOverlay)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)
(NOBRIDGE) ERROR Warning: TypeError: Cannot read property 'ctx' of undefined
This error is located at:
in App (created by ErrorOverlay)
in ErrorToastContainer (created by ErrorOverlay)
in ErrorOverlay (created by withDevTools(ErrorOverlay))
in withDevTools(ErrorOverlay)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)
› Reloading apps
iOS Bundling failed 1141ms node_modules/expo-router/entry.js (10 modules)
ERROR SyntaxError: my-app/node_modules/expo-router/build/qualified-entry.js: Support for the experimental syntax 'jsx' isn't currently enabled (20:13):
18 | // Must be exported or Fast Refresh won't update the context
19 | function App() {
Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx) to the 'plugins' section to enable parsing.
If you already added the plugin for this syntax to your config, it's possible that your config isn't being loaded.
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:
npx cross-env BABEL_SHOW_CONFIG_FOR=/my-app/node_modules/expo-router/build/qualified-entry.js
See https://babeljs.io/docs/configuration#print-effective-configs for more info.
› Stopped server
iOS Bundling failed 3250ms node_modules/expo-router/entry.js (339 modules)
ERROR node_modules/expo-router/_ctx.ios.js: node_modules/expo-router/_ctx.ios.js:Invalid call at line 2: process.env.EXPO_ROUTER_APP_ROOT
First argument of
require.context
should be a string denoting the directory to require.› Stopped server
iOS Bundling failed 3187ms node_modules/expo-router/entry.js (340 modules)
ERROR node_modules/expo-router/_ctx.ios.js: node_modules/expo-router/_ctx.ios.js:Invalid call at line 2: process.env.EXPO_ROUTER_APP_ROOT
First argument of
require.context
should be a string denoting the directory to require.iOS Bundling failed 181ms node_modules/expo-router/entry.js (225 modules)
ERROR SyntaxError: my-app/node_modules/@expo/metro-runtime/src/location/install.native.ts: Missing semicolon. (16:37)
14 | import getDevServer from '../getDevServer';
15 |
The text was updated successfully, but these errors were encountered: