software-mansion / react-native-ide

VSCode extension that turns your editor into a fully fledged IDE for React Native and Expo.
https://ide.swmansion.com
Other
739 stars 24 forks source link

Unable to resolve module missing-asset-registry-path #162

Open gutenye opened 2 months ago

gutenye commented 2 months ago

Use React Native IDE to build, I got this error

node_modules/metro/src/DeltaBundler/Graph.js:314:20
2024-04-24 08:17:08.278 [error] Unable to resolve module missing-asset-registry-path from a.png: missing-asset-registry-path could not be found within the project or in these directories:
  node_modules
  ../node_modules
  ../../node_modules
  node_modules
> 1 | �PNG

But If I run react-native run-ios, the build works fine.

kmagiera commented 2 months ago

would you be able to share more details about your project setup? Is the app you're building public? If so can you provide a link? If not can you share metro and babel config from your project and some project structure outline (is this a monorepo / expo app / react-native community CLI project?)

headfire94 commented 2 months ago

@kmagiera we are using react-native-cli fork with some security patches, everything is private unfortunately. Our fork is 1 years old so that you understand how far we are from new release.

We are using a specific project structure with 2 node_modules:

package.json (tooling, eslint, jest)
babel.config.js
src
 - ios
 - android
 - package.json (metro, packages which used in runtime)
 - components
 - 

"metro": "0.73.10", config:

 {
  reporter: { update: [Function (anonymous)] },
  resolver: {
    extraNodeModules: {},
    blockList: /(\/test\/traces\/.*|\/__tests__\/.*)$/,
    sourceExts: [
      'js',   'jsx',
      'json', 'ts',
      'tsx',  'cjs',
      'mjs',  'po'
    ],
    resolveRequest: [Function: resolveRequest]
  },
  watchFolders: [],
  transformer: {
    minify: true,
    minifierPath: 'metro-minify-uglify',
    minifierConfig: { mangle: [Object] },
    getTransformOptions: [Function: getTransformOptions]
  },
  projectRoot: 'PATH_TO_ROOT/src'
}

Any ideas where i can take a look for this error? maybe it just wait some dummy png file

harshal-moneylion commented 1 month ago

I am also facing this normal react-native run-ios works with no issues. and our app dont have expo. no metro.config.js as well

node_modules/react-native/Libraries/LogBox/UI/LogBoxImages/close.png: missing-asset-registry-path could not be found within the project or in these directories: