Reputation: 11
So, I'm running the following command to install it: I'm using MACOS
npm install -g expo-cli
And this is what I get:
npm WARN deprecated u/hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated u/hapi/[email protected]: Moved to 'npm install u/sideway/address'
npm WARN deprecated u/hapi/[email protected]: Moved to 'npm install u/sideway/formula'
npm WARN deprecated u/hapi/[email protected]: Moved to 'npm install u/sideway/pinpoint'
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
/Users/lachitbaruah/.npm-global/bin/expo-cli -> /Users/lachitbaruah/.npm-global/lib/node_modules/expo-cli/bin/expo.js
/Users/lachitbaruah/.npm-global/bin/expo -> /Users/lachitbaruah/.npm-global/lib/node_modules/expo-cli/bin/expo.js
npm WARN u/pmmmwh/[email protected] requires a peer of react-refresh@^0.8.2 but none is installed. You must install peer dependencies yourself.
updated 14 packages in 102.228s
I have tried almost everything!! But I want the solution for this particular thing.
Upvotes: 1
Views: 3234
Reputation: 501
I found a fix that don't require using yarn
or enabling an unsafe flag as of today (12 Mar 2022), and it's all because of this issue: https://github.com/npm/cli/issues/3472
Basically npm
can't fix the dependencies (v. 7 or 8), simply run npm install -g npm@6
and continue with the installation process.
On an editorial note, it's pretty insane that a year old bug carried over into 2 majors prevents the installation of something as popular as React Native. I really hope this answer will help people like me who try to get started because I almost abandoned myself.
Upvotes: 1
Reputation: 1
Run these two commands
sudo npm install npm@latest -g
sudo npm install -g expo-cli
Upvotes: 0