Expo Error cant install new Packages!!!

I updated Expo CLI and then I wanted to add a new Package but it yields this error and I cant fix it with rm -rf nodemodules because windows does not understand what -rf means…

PS C:\Dev\Programmierung\Schulprojekt> expo install expo-image-picker
Installing 1 SDK 36.0.0 compatible native module using npm.
> npm install
npm ERR! code EISGIT
npm ERR! path C:\Dev\Programmierung\Schulprojekt\node_modules\react-native-paper\node_modules\react-native-safe-area-view
npm ERR! git C:\Dev\Programmierung\Schulprojekt\node_modules\react-native-paper\node_modules\react-native-safe-area-view: Appears to be a git repo or submodule.   
npm ERR! git     C:\Dev\Programmierung\Schulprojekt\node_modules\react-native-paper\node_modules\react-native-safe-area-view
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Dev\npm\npm-cache\_logs\2020-05-11T09_46_39_479Z-debug.log

npm exited with non-zero code: 1
Error: npm exited with non-zero code: 1
    at ChildProcess.completionListener (C:\Dev\npm\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:65:13)
    at Object.onceWrapper (events.js:313:26)
    at ChildProcess.cp.emit (C:\Dev\npm\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
    ...
    at Object.spawnAsync [as default] (C:\Dev\npm\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:26:19)
    at NpmPackageManager._runAsync (C:\Dev\npm\npm\node_modules\expo-cli\node_modules\@expo\package-manager\src\NodePackageManagers.ts:150:31)
    at NpmPackageManager.addAsync (C:\Dev\npm\npm\node_modules\expo-cli\node_modules\@expo\package-manager\src\NodePackageManagers.ts:97:18)
    at Command.<anonymous> (C:\Dev\npm\npm\node_modules\expo-cli\src\exp.ts:85:7)

I’ve found install expo modules to be a pain in the butt. You’ll find either get random node_module failures and it’s hard to uninstall. I usually google npm “the package” and download it that way. It gets ugly if you don’t.

That being said, revert to an earlier commit if it’s not too much trouble. Otherwise, find the path of the module, delete it and npm install the package.

if you read the error message you will see that this error has nothing to do with any expo package. react-native-paper, which i guess you are using for your school project, depends on a version of react-native-safe-area-view which is installed through git. i don’t know how you have your project set up but you should refer to the error message for more info

care to explain? it’s literally just npm install with a given version. if you are having npm errors there is likely an issue with your project or the npm setup on your machine.

I was first trying to use expo to install all the packages that I needed for my project. It with either expo-asset or expo-constants, I was getting an axios error. There are some posts running around about having issues with packages using expo install.

After some forum research and time trying to remove the module, I just reverted the node-module install via expo and used npm to install the package.

what was the axios error? maybe your internet connection happened to be down at the time you ran the command?

It was weeks back and I didn’t bother to keep it. Also, the company had no outages, so doubt it was a connection. Either way, that’s how I dealt with my unusual expo install error and was back to coding.

1 Like

cool, well i would encourage you to use expo install because you may run into incompatibility issues if you don’t. if you run into the issue again then please post an issue on https://github.com/expo/expo-cli with more information! :slight_smile:

1 Like

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