Non critical errors during packaging with module-resolver

Please provide the following:

  1. SDK Version: 36.0.2
  2. Platforms: iOS and Android

Bundler will issue non-critical errors during packaging with module-resolver.

Steps to Repro:

  • Create a new app using expo-cli and choose TypeScript template.
  • Set up tsconfig.json as follows:
 "paths": {
      "@models/*": ["./src/models/*"],
      "@navigation/*": ["./src/navigation/*"],
      "@services/*": ["./src/services/*"],
      "@components/*": ["./tsx/components/*"],
      "@screens/*": ["./tsx/screens/*"],
      "@assets/*": ["./assets/*"]
    }

Similarly configure babel.config.js:

        plugins: [
            [
                'module-resolver',
                {
                    root: ['./'],
                    alias: {
                        '@models': path.resolve(path.dirname('.'), 'src/models'),
                        '@navigation': path.resolve(path.dirname('.'), 'src/navigation'),
                        '@services': path.resolve(path.dirname('.'), 'src/services'),
                        '@screens': path.resolve(path.dirname('.'), 'tsx/screens'),
                        '@components': path.resolve(path.dirname('.'), 'tsx/components'),
                        '@assets': path.resolve(path.dirname('.'), 'assets'),
                    }
                }
            ]
        ]

The above works, however when bundling get many errors as follows:

transform[stderr]: Could not resolve "/Users/jblues/mobbiz/LOSMobileApp/src/navigation/AppNavigator" in file /Users/jblues/LOSMobileApp/tsx/App.tsx.
transform[stderr]: Could not resolve "/Users/jblues/LOSMobileApp/tsx/components/BottomTabNavigator" in file /Users/jblues/LOSMobileApp/src/navigation/AppNavigator.ts.
transform[stderr]: Could not resolve "/Users/jblues/mobbiz/LOSMobileApp/tsx/screens/Login" in file /Users/jblues/LOSMobileApp/src/navigation/AppNavigator.ts.

etc etc (more of the same errors follow)

Despite the error reported, everything appears to be working correctly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.