Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: index.js: The "id" argument must be of type string. Received undefined #1732

Open
walidhousni30 opened this issue Jun 26, 2023 · 1 comment
Labels
🚇 Metro: RN JS bundler

Comments

@walidhousni30
Copy link

Hello i m having a major issue im trying to run the project but i have this error

error: index.js: The "id" argument must be of type string. Received undefined

My metro.config.js config
`const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const path = require('path')

/**

  • Metro configuration
  • https://facebook.github.io/metro/docs/configuration
  • @type {import('metro-config').MetroConfig}
    */
    const config = {
    watchFolders: [path.resolve(__dirname, '../../')],
    resolver: {
    unstable_enableSymlinks: true,
    experimentalImportSupport: false,
    inlineRequires: true,
    unstable_enablePackageExports: true,
    resolverMainFields: ['sbmodern', 'react-native', 'browser', 'main'],
    sourceExts: ['js', 'jsx', 'ts', 'tsx', 'mjs', 'json'],
    },
    transformer: {
    getTransformOptions: async () => ({
    transform: {
    experimentalImportSupport: false,
    inlineRequires: false,
    },
    }),
    },
    };

module.exports = mergeConfig(getDefaultConfig(__dirname), config);
`

@leotm
Copy link
Owner

leotm commented Jul 27, 2023

it's hard to tell atm but noted unstable_enableSymlinks and unstable_enablePackageExports are RN 0.72 beta features
https://reactnative.dev/blog/2023/06/21/0.72-metro-package-exports-symlinks#enabling-beta-features

then unstable_ prefix removed in RN 0.73+ (enabled by default)
https://reactnative.dev/blog/2023/06/21/package-exports-support#the-future-stable-exports-enabled-by-default

a repro would be great and any more detail on your use case

otherwise i'll look into upgrading to RN 0.72.3 (then 0.72.4)

then enabling Metro beta features ^

@leotm leotm added the 🚇 Metro: RN JS bundler label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚇 Metro: RN JS bundler
Projects
None yet
Development

No branches or pull requests

2 participants