I am having trouble running Expo. I installed it, plus I installed Node (version 11.15.0) and NPM (version 6.7.0). But when I try to run Expo, I get “Error: cannot find module ‘minizlib’”.
I don’t know what the problem is, I’ve had Expo installed on this machine before but I needed to reinstall Ubuntu.
I have tried many things. I also tried manually installing minizlib with NPM but that also does nothing. When I btw do “npm ls expo-cli” or “npm ls expo” I get empty back.
Can someone help me please! It’s kinda important to get this working as soon as possible.
I also have one small question, is it possible to use Expo on Chrome os? (for developing purposes) I’ve installed it on Chrome os, but when I try to test an app with tunnel I get “tunnel not found”, and also with LAN it doesn’t work, I suspect that the LAN problem is caused by Chrome’s firewall.
If someone can help me that would be great! At least with the big problem with minizlib.
Just to clarify, expo-cli successfully installs but starting a project doesn’t work? If so, can you let me know what command you are using to start your project and also run the cmd expo diagnostics for me and post the log that’s printed out here please.
Yes, Expo installs correctly. But doing anything with the command “expo” results in the following error:
Error: Cannot find module 'minizlib'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
at Function.Module._load (internal/modules/cjs/loader.js:591:27)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/usr/local/lib/node_modules/expo-cli/node_modules/tar/lib/pack.js:28:14)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
So for example running expo diagnostics doesn’t work also. Also, I even tried uninstalling expo and before reinstalling testing the expo command, and even then it gives me above error.
After googling this a bit, it seems like this may be caused by some issue with node. Most topics recommend uninstalling and re-installing node to try and remedy this.
Same issue here. I have Ubuntu 18.04 LTS node 10.16 and npm 6.9. I have tried reinstalling expo-cli and nodejs multiple times to no avail. I have the exact same error as @congreats.
So here are the steps I took to fix the issue.
I uninstalled expo-cli with this command:
sudo npm uninstall -g expo-cli
This is did not actually uninstall expo and nothing I could do would. So i deleted the folder with this command: sudo rm -r /usr/local/lib/node_modules/expo-cli
I then reinstalled using yarn instead with: yarn global add expo-cli --save
I updated the PATH in .bashrc to include export PATH="$(yarn global bin):$PATH" to the bottom of the file.
This fixed the issue for me. It seems to all stem from a permissions error on installation for the sharp library.