Issue installing expo-cli with node versions.

With NodeJS version 10.15.2, I’m able to install expo-cli. But when I do expo init, I get an error that the expo command is not found.

I tried looking for possible solutions in other forums and came to know that it has got something to do with the versions of Node.

So I downgraded to Node v8.1.2 and npm 5.0.3.
Now I do not get the command not found error, but a different error which I couldn’t find a solution for.

The error message displayed is:

(0 , (_wordwrap || _load_wordwrap(…)).default)(…)(…).trimStart is not a function

TypeError: (0 , (_wordwrap || _load_wordwrap(…)).default)(…)(…).trimStart is not a function
at /expo-cli@2.11.6/src/commands/init.js:105:19
at Array.map (native)
at _callee$ (/expo-cli@2.11.6/src/commands/init.js:95:37)
at tryCatch (/home/narasimha/.nvm/versions/node/v8.1.2/lib/node_modules/expo-cli/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/narasimha/.nvm/versions/node/v8.1.2/lib/node_modules/expo-cli/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/home/narasimha/.nvm/versions/node/v8.1.2/lib/node_modules/expo-cli/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/home/narasimha/.nvm/versions/node/v8.1.2/lib/node_modules/expo-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /home/narasimha/.nvm/versions/node/v8.1.2/lib/node_modules/expo-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at Promise ()
at F (/home/narasimha/.nvm/versions/node/v8.1.2/lib/node_modules/expo-cli/node_modules/core-js/library/modules/_export.js:36:28)

My expo version is 2.11.6!

CRNA used to work fine! Expo just killed everything! No offense.

Hey @narasimhakamath,

According to our docs, you need to have Node.js (version 10 or newer). I would first try updating your Node and npm versions. You can follow the docs link I provided to get instructions on installing the most up to date versions of those.

After that, I’d re-install expo because if the command isn’t found, it’s most likely that the expo-cli wasn’t installed properly

Best of luck!

@narasimhakamath
This is probably a problem from your node installation, I would suggest you reinstall node (consider using the latest version).

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