Expo start returns cannot find module split-string in loader.js

I tried running my app from the command line with expo commands but none it worked, it throws an error that reads cannot find module split-string.
How do i fix this please.

Hey! Could you paste the error here? Sounds like maybe a missing dependency

C:\Users\DevLewa>cd desktop/app/agrosprite

C:\Users\DevLewa\Desktop\app\AgroSprite>expo start
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module ‘split-string’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\exp
o-cli\node_modules\braces\lib\utils.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

This is the actual error I get.

I would make sure you’ve installed this module correctly with either yarn or npm

I actually did that using yarn add split-string but the error persist.

Can you share your package.json file? I just made a new project and was able to install/use split-string with no errors.

{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“eject”: “expo eject”
},
“dependencies”: {
@react-native-community/async-storage”: “^1.4.2”,
“expo”: “^32.0.0”,
“react”: “16.5.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz”,
“react-native-image-picker”: “^0.28.1”,
“react-native-keyboard-aware-scroll-view”: “^0.8.0”,
“react-native-keyboard-aware-view”: “^0.0.14”,
“react-navigation”: “^3.11.0”,
“split-string”: “^6.1.0”
},
“devDependencies”: {
“babel-preset-expo”: “^5.0.0”
},
“private”: true
}

okay, pretty much the same as mine. Could you share your code?

Here is my App.js

import React from ‘react’;
import LoginForm from ‘./src/Login/LoginForm’;
import Register from ‘./src/Register/Register’;
import Timeline from ‘./src/Timeline/Timeline’;
import Post from ‘./src/Product/Post’;
import Profile from ‘./src/Profile/Profile’;
import ViewProduct from ‘./src/Timeline/ViewProduct’;
import Notification from ‘./src/Notification/Notification’;
import IconWithBadge from ‘./src/Utility/IconWithBadge’;

import {createBottomTabNavigator,createStackNavigator,createSwitchNavigator, createAppContainer } from “react-navigation”;
import { Font } from ‘expo’;
import { Expo } from ‘expo’;
import { Ionicons } from ‘@expo/vector-icons’;

const AuthStack = createStackNavigator(
{
LoginScreen: {screen:LoginForm,navigationOptions: { header: null }},
RegisterScreen: {screen: Register,navigationOptions: { header: null }},
},
{
initialRouteName: “LoginScreen”,
}
);
const UthStack = createStackNavigator(
{
ViewProduct: {screen:ViewProduct,navigationOptions: { header: null }},
Timeline: {screen:Timeline},
}
);
const AppStack = createBottomTabNavigator(
{
Timeline:Timeline,
Product: Post,
Notification: Notification,
Profile: Profile
},
{
defaultNavigationOptions: ({ navigation }) => ({
tabBarIcon: ({ focused, horizontal, tintColor }) => {
const { routeName } = navigation.state;
let IconComponent = Ionicons;
let iconName; let badgeCount;
if (routeName === ‘Timeline’) {
iconName = ios-home;
// Sometimes we want to add badges to some icons.
// You can check the implementation below.
IconComponent = IconWithBadge;
} else if (routeName === ‘Product’) {
iconName = ios-add-circle;
} else if(routeName === ‘Profile’){
iconName = md-person;
}else if(routeName === ‘Notification’){
iconName = ios-notifications;
}

    // You can return any component that you like here!
    return <IconComponent name={iconName} size={25} color={tintColor} screen={routeName} />;
  },
}),
tabBarOptions: {
  activeTintColor: 'green',
  inactiveTintColor: 'gray',
},

}
)

const AppContainer = createAppContainer(
createSwitchNavigator(
{
Auth: AuthStack,
App: AppStack,
Uth: UthStack
}
));

export default class App extends React.Component {
render() {
return (

);
}
}

The App.js is my entry file as usual and that is the code

None of the expo commands works with any of my expo rn apps. It will always result to cannot find module split-string

Ah, sorry- I was confused about the issue. Now I understand

Can you run expo diagnostics and paste the output?

DevLewa@DevLewa-PC MINGW64 ~/Desktop/app/AgroSprite (master)
$ expo start
raven@2.6.3 alert: failed to send exception to sentry: Connection timed out on request to sentry.io
Error: Cannot find module ‘./WarnCaseSensitiveModulesPlugin’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\expo-cli\node_modules\webpack\lib\WebpackOptionsApply.js:29:40)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\expo-cli\node_modules\webpack\lib\webpack.js:10:29)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:@expo\xdl@56.1.3\src\Webpack.js:8:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:@expo\xdl@56.1.3\src\Project.js:70:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:@expo\xdl@56.1.3\src\xdl.ts:115:17)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\expo-cli@3.0.4\src\exp.ts:17:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js:20:3)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

I tried installing split-string globally using

npm install -g split-string then I tried running the expo diagnostics, that was what gave me my previous reply.

Please i need to get this solved. PLEASE

I still need you to run expo diagnostics and paste the output here

output is here

$ expo diagnostics
raven@2.6.3 alert: failed to send exception to sentry: Connection timed out on request to sentry.io
Error: Cannot find module ‘./WarnCaseSensitiveModulesPlugin’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\expo-cli\node_modules\webpack\lib\WebpackOptionsApply.js:29:40)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\expo-cli\node_modules\webpack\lib\webpack.js:10:29)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:@expo\xdl@56.1.3\src\Webpack.js:8:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:@expo\xdl@56.1.3\src\Project.js:70:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:@expo\xdl@56.1.3\src\xdl.ts:115:17)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\expo-cli@3.0.4\src\exp.ts:17:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\DevLewa\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js:20:3)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Okay, so something probably went wrong with your installation. I’d follow the steps here closely