Unable to install Expo CLI. (NPM WARN Deprecated) - node.js

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/joi#17.1.1: Switch to 'npm install joi'
npm WARN deprecated u/hapi/address#4.1.0: Moved to 'npm install u/sideway/address'
npm WARN deprecated u/hapi/formula#2.0.0: Moved to 'npm install u/sideway/formula'
npm WARN deprecated u/hapi/pinpoint#2.0.0: Moved to 'npm install u/sideway/pinpoint'
npm WARN deprecated core-js#2.6.12: 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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated joi#11.4.0: 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 topo#2.0.2: 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 hoek#4.2.1: 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/react-refresh-webpack-plugin#0.3.3 requires a peer of react-refresh#^0.8.2 but none is installed. You must install peer dependencies yourself.
expo-cli#4.4.4
updated 14 packages in 102.228s
I have tried almost everything!! But I want the solution for this particular thing.

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.

Try sudo npm install expo-cli -g --unsafe-perm

Run these two commands
sudo npm install npm#latest -g
sudo npm install -g expo-cli

Related

NPM Error Message: I am getting an error message installing swagger

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements!
npm install -g swagger
npm WARN deprecated formidable#1.2.6: Please upgrade to latest, formidable#v2 or formidable#v3! Check these notes:
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated formidable#1.0.17: Please upgrade to latest, formidable#v2 or formidable#v3! Check these notes:
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated to-iso-string#0.0.2: to-iso-string has been deprecated, use #segment/to-iso-string instead.
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated URIjs#1.16.1: package renamed to "urijs" (lower-case), please update accordingly
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated mkdirp#0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated superagent#3.8.3: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem
errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated superagent#1.8.5: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem
errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated swagger-editor#2.10.5: No longer maintained, please upgrade to swagger-editor#3.
npm WARN deprecated core-js#2.6.12: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engin
e 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.
added 453 packages, and audited 454 packages in 16s
8 packages are looking for funding
run `npm fund` for details
30 vulnerabilities (1 low, 11 moderate, 12 high, 6 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm install express
up to date, audited 219 packages in 987ms
23 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Those are not errors but warnings that won't affect your working and how swagger behaves. They just notify the user who might be the maker of the package to update their package as the packages their package depends upon have been deprecated and may have bugs
It looks like it installed ok but as per #Arnav's answer it is just highlighting the deprecated packages.
I ran into a similar issue but the install was ultimately failing with ERR! messages when installing locally in the project.
Instead I installed globally with npm i -g swagger-editor which works fine.

npm install gives many WARN deprecated lines

I've been working around with React recently, trying to figure it all out and practice. But every time I create a new project I end up with a plethora of deprecated warnings. I am just curious as to why this is and how I go about fixing them as some of them say they are no longer maintained. It seems like they could just be removed but I'm not sure how to get that done or if I even should. Maybe it is just best to ignore them? Same thing goes along with the vulnerabilities, the only fix listed under them is to use fix --force and even that doesn't seem to fix the issues. Should I just be ignoring all of them? Here is the list I usually get on npm install or when creating a react project:
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated core-js#2.6.12: 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.
I just want to know how to get these removed/fixed or if they will always be there and to just ignore them. Thanks for any help!

Truffle Install (WARN deprecated)

`manuelfiestas#Manuels-MBP node_modules % npm install -g truffle
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated remotedev-serialize#0.1.9: Package moved to #redux-devtools/serialize.
npm WARN deprecated redux-devtools-instrument#1.10.0: Package moved to #redux-devtools/instrument.
npm WARN deprecated redux-devtools-core#0.2.1: Package moved to #redux-devtools/app.
npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multicodec#0.5.7: stable api reached
npm WARN deprecated node-pre-gyp#0.11.0: Please upgrade to #mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the #mapbox scoped package will recieve updates in the future
npm WARN deprecated axios#0.20.0: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm WARN deprecated core-js#2.6.12: 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.
added 1713 packages, and audited 1714 packages in 1m
96 packages are looking for funding
run npm fund for details
53 vulnerabilities (16 low, 8 moderate, 29 high)
To address all issues, run:
npm audit fix
Run npm audit for details.
manuelfiestas#Manuels-MBP node_modules %`
delete all files you have in your filesystem from old failed installations and try again
The answer below stands for a manual installation, but there is a much simpler way : the automatic install.
Open Powershell as admin and run npm install -g windows-build-tools
The install takes time but it worked.

"npm outdated" and "npm outdated -g" don't show anything so why am I getting these warnings of deprecations?

I have node.js version 12.16.3 (macOS x64), the most current LTS version. The npm version is 6.14.4, which comes as default with the node.js version already stated. My operating system is Catalina 10.15.4 (the latest version).
When I run npm outdated and npm outdated -g nothing is returned, I simply get a new line.
Yet when I run this inside of my project:
npm init followed by npm i --save-dev babel-cli babel-preset-env, I get these warnings:
npm WARN deprecated chokidar#1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated fsevents#1.2.12: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
I have tried running npm install chokidar#^3 and I get the exact same warnings.
I have tried running npm install chokidar#latest and I get the exact same warnings.
I can't seem to update what I am being told to update. How can I resolve this issue?
Any help is much appreciated.

Install ember#1.13.13 on Windows 7 and it keeps hanging on the extract of bower

I'm trying to "npm install -g ember#1.13.13" on Windows 7 and it keeps hanging on the extract of bower. I've tried clearing the npm cache and the bower cache but it still hangs. I'm installing that specific version of ember as that is the version required for the project I'm involved with. Here is the command window output;
C:\Windows\System32>npm install -g ember-cli#1.13.13
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls gracef
ul-fs' to find it in the tree.
npm WARN deprecated lodash-node#2.4.1: This package has been discontinued in favor of lodash#^4.0.0.
npm WARN deprecated lodash-node#3.10.2: This package has been discontinued in favor of lodash#^4.0.0.
npm WARN deprecated cross-spawn-async#2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated socket.io-pure#1.3.12: socket.io-pure is no longer maintained as the original socket.io removed all native dependencies. Please use the original.
npm WARN deprecated lodash#2.3.0: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated engine.io-pure#1.5.9: engine.io-purce is no longer maintained as the original engine.io removed all native dependencies. Please use the original.
npm WARN deprecated socket.io-client-pure#1.3.12: socket.io-client-pure is no longer maintained as the original socket.io removed all native dependencies. Please use the original.
npm WARN deprecated ws-pure#0.8.0: ws-pure is no longer maintained as the original ws removed all native dependencies. Please use the original ws.
npm WARN deprecated engine.io-client-pure#1.5.9: engine-io-client-pure is no longer maintained as the original engine-io-client removed all native dependencies. Please use the orig
inal.
extract:bower ▌ ╢██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
These are the installed versions of
node: v4.4.7
npm: 3.3.12
bower: 1.7.9

Resources