Lewa Bammy Stephen
Lewa Bammy Stephen

Reputation: 399

How to fix error "Cannot find module" using "expo start"

After upgrading expo-cli to the latest version. I tried starting my app with 'expo start' but I got this error

     C:\Users\DevLewa\Desktop\app\AgroSprite>expo
      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.<anonymous> 
     (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)

How do I fix this please?

Upvotes: 0

Views: 6794

Answers (3)

Lewa Bammy Stephen
Lewa Bammy Stephen

Reputation: 399

I installed the missing module using

npm install -g split-string

and it worked.

Upvotes: 1

saifur
saifur

Reputation: 637

I faced the same problem . I uninstalled expo-cli and nodejs and installed again. It works for me.

Upvotes: 0

vincent O
vincent O

Reputation: 538

rollback to version 2.4.3

npm install -g [email protected]

Upvotes: 1

Related Questions