What can be done if there are errors with npm i -g expo-cli o npx expo-cli -h

I am trying to start a project for IOS, to learn native-react.
The issue I face is that the steps I should follow based on the course are nvm 16.19.0, nvm use 16.19.0, npm i -g expo-cli (npx expo-cli -h I used it to see the result since it was mentioned in the Docs).
Anyhow my problem is that I get the following error:
npm ERR! Unexpected token ‘.’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myuser\AppData\Local\npm-cache_logs\2023-05-30T19_28_36_815Z-debug-0.log
I have tried to clean cache as mentioned in StackOverflow, but I do not seem to have a fitting solution.
I am using Windows 11 and Powershell.

Hey @hermannr17,

I’m curious which doc did you see npx expo-cli -h to use? Curious if we should update docs on our end and may have missed out something.

Also, you don’t have to install expo-cli since we have a new versioned Expo CLI that works with npx. You don’t have to install it as a global dependency.

Here are the instructions to get started using Expo CLI: Installation - Expo Documentation

For example, you can run npx expo -h.

1 Like

I think, I missed used or confused the expo-cli.
Anyhow I run into the same issue while trying to run npx expo -h.
Do you think it may have to do with the node version or the Windows?

Are you able to install any other dependency as a global package with npm? Or use npx with any other library/framework?

I’d also suggest checking that there is no node.js installed prior to installing it with nvm.

Thanks for the help. I found out it had to do with node version and somewhat Windows.

1 Like

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