Skip to content

Metro error: Unable to resolve module @/components/navigation/TabBarIcon from C:\Users\quinc\project #32994

Closed
@quincynyan

Description

@quincynyan

Summary

I thought I was crazy because this started happening this morning and I thought I broke something by writing some code wrong, but nope, a fresh RN project install has the same issue:

Server Error
Unable to resolve module @/components/navigation/TabBarIcon from C:\Users\quinc\projects\Re\Re\app\(tabs)\_layout.tsx: @/components/navigation/TabBarIcon could not be found within the project or in these directories:
  node_modules
  2 | import React from 'react';
  3 | import { Platform } from 'rea... See More
Call Stack
<unknown>
app/(tabs)/_layout.tsx
Collapse 1 frame
Web Bundling failed 2909ms C:\Users\quinc\projects\Re\Re\node_modules\expo-router\entry.js (878 modules)
λ Bundling failed 2919ms C:\Users\quinc\projects\Re\Re\node_modules\expo-router\node\render.js (920 modules)

Metro error: Unable to resolve module @/components/navigation/TabBarIcon from C:\Users\quinc\projects\Re\Re\app\(tabs)\_layout.tsx: @/components/navigation/TabBarIcon could not be found within the project or in these directories:
  node_modules
  2 | import React from 'react';
  3 | import { Platform } from 'react-native';
> 4 |
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5 | import { HapticTab } from '@/components/HapticTab';
  6 | import { IconSymbol } from '@/components/ui/IconSymbol';
  7 | import TabBarBackground from '@/components/ui/TabBarBackground';


Call Stack
  <unknown> (app/(tabs)/_layout.tsx)
2024-11-17_19-53-36.mp4

What platform(s) does this occur on?

Android, Web

SDK Version

Latest

Environment

expo-env-info 1.2.1 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.22 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
    SDKs:
      Android SDK:
        API Levels: 31, 34, 35
        Build Tools: 30.0.2, 34.0.0, 35.0.0
        System Images: android-35 | Google Play Intel x86_64 Atom
    IDEs:
      Android Studio: AI-242.23339.11.2421.12550806
    npmPackages:
      expo: ~52.0.7 => 52.0.7
      expo-router: ~4.0.6 => 4.0.6
      react: 18.3.1 => 18.3.1
      react-dom: 18.3.1 => 18.3.1
      react-native: 0.76.2 => 0.76.2
      react-native-web: ~0.19.13 => 0.19.13
    Expo Workflow: managed

Minimal reproducible example

https://github.com/quincynyan/react-native-expo-error

this is literally a fresh install. i've done literally nothing yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIVersioned Expo CLI -- `npx expo start`stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions