I have started a lerna project using npx lerna init
package.json
{
"name": "root",
"private": true,
"scripts": {
"start:gamecenter": "cd packages/GameCenter && react-native run-android --port=8083"
},
"workspaces": {
"packages": ["packages/*"],
"nohoist": [
"**/react-native",
"**/react-native/**"
] },
"dependencies": {},
"devDependencies": {
"lerna": "^8.1.9"
}
}
lerna.json
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.0.0",
"packages": [
"packages/*"
],
"npmClient": "yarn"
}
in packages section I have created 2 react native project named Bingo , GameCenter
without changing metro config I get the following error;
ERROR ReferenceError: SHA-1 for file C:UsersFatihDesktopnewtestnode_modules@react-nativejs-polyfillsconsole.js is not computed.
Potential causes:
1) You have symlinks in your project - watchman does not follow symlinks.
2) Check `blockList` in your metro.config.js and make sure it isn't excluding the file path.
at DependencyGraph.getSha1 (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcnode-hasteDependencyGraph.js:181:13)
at Transformer._getSha1 (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcBundler.js:15:26)
at Transformer.transformFile (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcDeltaBundlerTransformer.js:92:19)
at Bundler.transformFile (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcBundler.js:43:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.transform (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrclibtransformHelpers.js:134:12)
at async transform (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcDeltaBundlerGraph.js:164:26)
at async visit (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcDeltaBundlerbuildSubgraph.js:82:29)
at async Promise.all (index 1)
at async buildSubgraph (C:UsersFatihDesktopnewtestpackagesBingonode_modulesmetrosrcDeltaBundlerbuildSubgraph.js:103:3)
when I updated the metro.config.js as following
const path = require('path');
module.exports = {
projectRoot: __dirname,
watchFolders: [path.resolve(__dirname, '../../node_modules')],
resolver: {
blockList: [/.*/node_modules/.*/node_modules/react-native/.*/],
},
};
I get the following error
unable to load script make sure you re either running metro ( run npx react-native start) or that your bundle index.android.bundle is packaged correctly for release
I did not modify any react native files How may I solve the issue
React native 0.76.5
node v20.18.0
"lerna": "^8.1.9"