JiglioNero Yuri Skorokhodov (@SounD120) This issue is still relevant in 2023, there is already a watchFolders: ['.vscode'] setting added to my metro.config.js, still getting the following error:
Error: Unable to resolve module ./.vscode/exponentIndex from /Users/username/Desktop/my-app/.:
None of these files exist:
* .vscode/exponentIndex(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg|.android.gif|.native.gif|.gif)
* .vscode/exponentIndex/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg|.android.gif|.native.gif|.gif)
at ModuleResolver.resolveDependency (/Users/username/Desktop/my-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:136:15)
at DependencyGraph.resolveDependency (/Users/username/Desktop/my-app/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
at /Users/username/Desktop/my-app/node_modules/metro/src/lib/transformHelpers.js:129:24
at Server._resolveRelativePath (/Users/username/Desktop/my-app/node_modules/metro/src/Server.js:1137:12)
at async Server.requestProcessor [as _processBundleRequest] (/Users/username/Desktop/my-app/node_modules/metro/src/Server.js:464:37)
at async Server._processRequest (/Users/username/Desktop/my-app/node_modules/metro/src/Server.js:420:9)
metro.config.js:
const { getDefaultConfig } = require('@expo/metro-config');
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig(__dirname);
return {
resolver: {
assetExts: [...assetExts, 'gif'].filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'gif'],
},
transformer: {
assetPlugins: ['expo-asset/tools/hashAssetFiles'],
},
watchFolders: ['.vscode'],
};
})();
package.json:
"expo": "^46.0.0",
"react-native": "0.69.6",
"react": "18.0.0",
project type: Expo Bare react native project
I checked my .vscode folder and only found a launch.json file...
I'm actually trying to run a expo dev client build on my physical device.
What I do is: (after building a dev client on EAS servers and installing it on android physical device):-
- yarn start -c (to start the server)
- scanned the qr generated from above command, launches the app and the error is thrown as mentioned above.
Any solution to this? as the above mentioned didn't work as expected...