throw error with any expo command

Hi,
I got fed up with trying to debug expo while developing my old app so decided to start from scratch.Even before I can create a new project
I am getting an error as follows. Any idea what this error means or what I should do?

C:\nodejs>npm version
{
npm: ‘6.14.7’,
ares: ‘1.16.0’,
brotli: ‘1.0.7’,
cldr: ‘37.0’,
icu: ‘67.1’,
llhttp: ‘2.0.4’,
modules: ‘83’,
napi: ‘6’,
nghttp2: ‘1.41.0’,
node: ‘14.8.0’,
openssl: ‘1.1.1g’,
tz: ‘2020a’,
unicode: ‘13.0’,
uv: ‘1.38.1’,
v8: ‘8.4.371.19-node.12’,
zlib: ‘1.2.11’
}

C:\nodejs>expo version
internal/modules/cjs/loader.js:1083
throw err;
^

Error: Cannot find module ‘C:\nodejs\node_modules\expo-cli\bin\expo.js’
e[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1080:15)e[39m
e[90m at Function.Module._load (internal/modules/cjs/loader.js:923:27)e[39m
e[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)e[39m
e[90m at internal/main/run_main_module.js:17:47e[39m {
code: e[32m’MODULE_NOT_FOUND’e[39m,
requireStack:
}

C:\nodejs>npm list -g expo-cli
C:\Users\roopali\AppData\Roaming\npm
`-- expo-cli@3.26.2

I thing that your node version is incompatible with Expo.

You are using Node 14.x, i recommend you to user Node 10 or 12.
I’m not familiar using Windows, but I thing you can use NVM:

Hello victorwads,
Thank you for your reply.I uninstalled nodejs and installed
node version 12.18.3
npm version 6.14.6
expo version 3.26.2
If I give command $expo, it shows all expo info so expo is installed.
$ expo init GDTD created the project successfully with expo template blank
$ cd GDTD

Then errors start again

C:\nodejs\GDTD>expo start
Starting project at C:\nodejs\GDTD
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser… (press shift-d to disable)
Error: spawn powershell ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

C:\nodejs\GDTD>npm start

@ start C:\nodejs\GDTD
expo start

Starting project at C:\nodejs\GDTD
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser… (press shift-d to disable)
Error: spawn powershell ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: expo start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have tried reading about this error and have tried the solutions given by @wodin here
expo start is running my project - #8 by saad9624
but there is no state.json file in the .expo folder

I am yet to write a single line of code in this project so I feel this issue is to do with how everything is setup on my system.

How do I solve this?

Hi @satejdm, don’t be mad, but, try reading this about using Linux Subsystem on Windows for a better developing experience

Yes, I think WSL2 is the best way to go. The documentation for building standalone apps says you need to use it, and I think it will work best even if you are not building standalone apps:

1 Like

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