admin管理员组文章数量:1394977
I am using react native and expo eas in my monorepo.
The app lives in
clients/mobile/<react native app>
My metro.config.js lives inside the mobile folder
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');
// Find the project and workspace directories
const projectRoot = __dirname;
// This can be replaced with `find-yarn-workspace-root`
const monorepoRoot = path.resolve(projectRoot, '../..');
const config = getDefaultConfig(projectRoot);
// 1. Watch all files within the monorepo
config.watchFolders = [monorepoRoot];
// 2. Let Metro know where to resolve packages and in what order
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(monorepoRoot, 'node_modules'),
];
module.exports = config;
I am using typescript as well.
I am getting this error
Error: Unable to resolve module @react-native-firebase/analytics from /home/expo/workingdir/build/node_modules/@react-native-firebase/crashlytics/lib/handlers.js: @react-native-firebase/analytics could not be found within the project or in these directories:
../../node_modules
node_modules
../../node_modules
17 |
18 | import { isError, once } from '@react-native-firebase/app/lib/common';
> 19 | import { getAnalytics, logEvent } from '@react-native-firebase/analytics';
I am not sure why. Any help would be much appreciated.
本文标签: typescriptExpo monorepo build fails with module not foundStack Overflow
版权声明:本文标题:typescript - Expo monorepo build fails with module not found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744108300a2591169.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论