Expo cli installed on linux, run from windows


#1

Hello,

I have a setup for expo cli on a linux system, but I access that project from windows (using samba), I have a drive mapped to that folder. Have node js and expo installed on windows machine and run commands using the windows powershell. When I start server I received a promise error:

(node:1380) UnhandledPromiseRejectionWarning: Error: spawnSync Y:\mobileapp\node_modules\react-native\local-cli\setup_env.bat EPERM
    at Object.spawnSync (internal/child_process.js:982:20)
    at spawnSync (child_process.js:596:24)
    at Object.execFileSync (child_process.js:624:13)
    at Object.run$ (Y:\mobileapp\node_modules\react-native\local-cli\cliEntry.js:146:14)
    at tryCatch (Y:\mobileapp\node_modules\regenerator-runtime\runtime.js:62:40)
    at Generator.invoke [as _invoke] (Y:\mobileapp\node_modules\regenerator-runtime\runtime.js:288:22)
    at Generator.prototype.(anonymous function) [as next] (Y:\mobileapp\node_modules\regenerator-runtime\runtime.js:114:21)
    at tryCatch (Y:\mobileapp\node_modules\regenerator-runtime\runtime.js:62:40)
    at invoke (Y:\mobileapp\node_modules\regenerator-runtime\runtime.js:152:20)
    at Y:\mobileapp\node_modules\regenerator-runtime\runtime.js:162:13
ERROR
12:32
(node:1380) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1380) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

If I try to connect with phone by scanning the QR code, it says “Package is not running at http://192.168.0.17”.

I assume is a problem with expo trying to start a local server on the linux machine. Anyway to make this work?


#2

Hey @gabyyro,

Can you share what version of the expo-cli you are running and what command(s) you are attempting to run?

Cheers,

Adam


#3

Expo cli version 2.6.14

I run powershell from the mobileapp drive in windows (mapped to the linux machine). From powershell I run expo start, it starts the bundler but gives the error and behavior mentioned above.


#4

Windows and Linux are different os.
If your project was set up on Linux npm will pull the appropriate packages. If you happen to switch OS you have to delete the node_modules folder them run npm install.


#5

I know that, but the linux folder is accessed through samba from windows. However, I set a repository on windows and push to linux so I avoid this situation. Thank you for answers.