Ran into a similar but fixed it by prefixing 'npx' before the expo command.
For example:
npx expo install expo-linear-gradient