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
I have an Expo project running in a pnpm workspace, and get the error ERROR TypeError: Cannot read property 'prototype' of undefined, js engine: hermes when adding Firebase and using anything from Firestore. I cannot for the life of me get this to work without disabling shared-workspace-lockfile. I'm not entirely sure if this is an issue with Firebase itself, but it is the only package that's given me this issue.
The error is ostensibly at index.rn.js (5826:1), but I can't find anything in there to patch.
Minimum Reproducible Example
apps/test/App.tsx
importReactfrom"react";import{Text,View}from'react-native';import{FieldPath}from"firebase/firestore";exportdefault()=>{// Literally anything from firebase/firestore that isn't shaken outFieldPath;return(<View><Text>
HELLO WORLD
</Text></View>);};
// Learn more: https://docs.expo.dev/guides/monorepos/const{ getDefaultConfig }=require("@expo/metro-config");constpath=require("path");constprojectRoot=__dirname;constworkspaceRoot=path.resolve(projectRoot,"../..");// Create the default Metro configconstconfig=getDefaultConfig(projectRoot,{isCSSEnabled: true});if(config.resolver){// 1. Watch all files within the monorepoconfig.watchFolders=[workspaceRoot,//path.resolve(workspaceRoot, "node_modules"),];// 2. Let Metro know where to resolve packages and in what orderconfig.resolver.nodeModulesPaths=[path.resolve(projectRoot,"node_modules"),path.resolve(workspaceRoot,"node_modules"),];// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`config.resolver.disableHierarchicalLookup=true;config.resolver.extraNodeModules=[path.resolve(workspaceRoot,"node_modules"),];config.resolver.sourceExts=['jsx','js','ts','tsx','cjs','mjs','json'];}module.exports=config;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Overview
I have an Expo project running in a pnpm workspace, and get the error
ERROR TypeError: Cannot read property 'prototype' of undefined, js engine: hermes
when adding Firebase and using anything from Firestore. I cannot for the life of me get this to work without disablingshared-workspace-lockfile
. I'm not entirely sure if this is an issue with Firebase itself, but it is the only package that's given me this issue.The error is ostensibly at
index.rn.js (5826:1)
, but I can't find anything in there to patch.Minimum Reproducible Example
apps/test/App.tsx
.npmrc
apps/test/package.json
apps/test/index.js
apps/test/metro.config.js
Beta Was this translation helpful? Give feedback.
All reactions