Unable to resolve any new file I add

Hello good people, I’m having a troublesome issue and I’m at a standstill with my development.

Everytime I try to use Expo, it is unable to resolve additional files that I try to add to the project.

For example, after building a clean project, running expo on my device has been fine, real time updates working as expected. As soon as I add a new file and import it, it is unable to resolve it. Yes, I’m positive the file is there.

Unable to resolve "./components/NewFile" from "App.js"

This is the same issue I have with expo on any tutorial I try to follow.

My current stats:

yarn -v 1.12.3
“expo”: “^31.0.2”,
“react”: “16.5.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz

Any help would be greatly appreciated.

Hey @bauervision,

Sorry you’re experiencing these issues. Can you try running expo start -c to clear your packager cache and see if that helps at all?



1 Like

No change. Here is the log

You can see its also complaining about those default images inside of .assets that I removed.

Here is my entire App.js

import React from 'react';
import {
} from 'react-native';
import SearchInput from './components/SearchInput';

export default class App extends React.Component {
  render() {
    return (
      <KeyboardAvoidingView style={styles.container} behavior="padding">
        <Text style={[styles.largeText, styles.textStyle]}>San Francisco</Text>
        <Text style={[styles.smallText, styles.textStyle]}>Light Cloud</Text>
        <Text style={[styles.largeText, styles.textStyle]}>24°</Text>

        <SearchInput placeholder="Search any city" />

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center'
  blue: {
    color: 'blue'
  textStyle: {
    textAlign: 'center',
    fontFamily: 'Roboto'
  largeText: {
    fontSize: 44
  smallText: {
    fontSize: 18
  textInput: {
    backgroundColor: '#666',
    color: 'white',
    height: 40,
    width: 300,
    marginTop: 20,
    marginHorizontal: 20,
    paddingHorizontal: 10,
    alignSelf: 'center',
    borderRadius: 8

It’s like it’s not updating, but I have cleared the cache.

Hey @bauervision, sorry that you’re having this issue with Expo CLI.

To fully clear the internal state of the CLI, could you try removing the .expo folder in your project folder and then restarting (again) with expo start -c? Also make sure that you’re running the start command from your project root folder.

If that doesn’t help, could you also copy paste the contents of your app.json and the output from running expo diagnostics?

thanks for getting back with me @fson, none of my projects are working now. I’m trying to do a clean install in a fresh project but I can’t get past it crashing on install:

It hangs on this line:

finalize:@expo/traveling-fastlane-darwin: sill finalize C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules

and then crashes

npm ERR! path C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink ‘C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll’
npm ERR! { Error: EPERM: operation not permitted, unlink ‘C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll’
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink ‘C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll’
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘C:\Users\\AppData\Roaming\npm\node_modules\expo-cli\node_modules\.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll’ },
npm ERR! stack: ‘Error: EPERM: operation not permitted, unlink ‘C:\Users\\AppData\Roaming\npm\node_modules\expo-cli\node_modules\.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll’’,
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘C:\Users\\AppData\Roaming\npm\node_modules\expo-cli\node_modules\.xdl.DELETE\binaries\windows\adb\AdbWinUsbApi.dll’,
npm ERR! parent: ‘expo-cli’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

I’m stuck

This looks like a problem with permissions. Could you manually delete the folder at C:\Users\AppData\Roaming\npm\node_modules\expo-cli (you may need to use an Admin user) and then re-install expo-cli?

Ok that got me past the install issue, will redo the app now and report back, thanks

@fson Same issue. Unable to resolve the new file.

expo diagnostics:

Expo CLI 2.4.3 environment info:
      OS: Windows 10
      Yarn: 1.12.3 - C:\Users\Mike.Bauer\AppData\Roaming\npm\yarn.CMD
      npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
      Android Studio: Version AI-181.5540.7.32.5014246

  Diagnostics report:
\[09:50:08] Request failed with status code 500
[09:50:08] Set EXPO_DEBUG=true in your env to view the stack trace.


  "expo": {
    "name": "weather-app",
    "description": "This project is really great.",
    "slug": "weather-app",
    "privacy": "public",
    "sdkVersion": "31.0.0",
    "platforms": ["ios", "android"],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    "updates": {
      "fallbackToCacheTimeout": 0
    "assetBundlePatterns": [
    "ios": {
      "supportsTablet": true

I add a new file under /src/components, and import it into App.js, and it can’t resolve it.

I deleted the .expo folder and ran expo start -c, same result.

I did add the file while the metro bundler was running, then once it returned unresolved, I realized this and closed it. But still the same result

Then just to be sure, I restarted VSCode and same result.

I guess I need to hold off on expo

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