Unable to run the command 'npm i -g expo-cli' - javascript

I'm trying to run npm install - g expo-cli on a windows 10 but it doesn't work. I keep getting this error message.
Please Help!
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 chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
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 source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 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 subscriptions-transport-ws#0.9.8: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated graphql-tools#3.0.0: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
changed 1556 packages, and audited 1557 packages in 2m
118 packages are looking for funding
run `npm fund` for details
26 vulnerabilities (10 moderate, 16 high)
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.

acutely your NPM install work and you install your package successfully these warning and error just say some package that's you use in project are deprecated and you can install new versions. and you can audit these with NPM audit. so just ignore this and resume you work:)

Related

Node_Modules folder vanishes after 'npm install'

Getting some weird behavior whenever I run my 'npm install' command on my project on a new computer. My node_modules folder vanishes upon completion of my install command. Any help is appreciated!
Here is the log:
PS C:\Dev\eth> npm i
npm WARN deprecated truffle-hdwallet-provider#0.0.3: WARNING: This package has been renamed to #truffle/hdwallet-provider.
npm WARN deprecated uuid#3.3.2: 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 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 ethereumjs-tx#1.3.7: New package name format for new versions: #ethereumjs/tx. Please update.
npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase#0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multibase#0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm WARN deprecated multicodec#0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated multicodec#1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated ethereumjs-tx#1.3.7: New package name format for new versions: #ethereumjs/tx. Please update.
npm WARN deprecated ethereumjs-vm#2.6.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm WARN deprecated ethereumjs-block#1.7.1: New package name format for new versions: #ethereumjs/block. Please update.
npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm WARN deprecated cids#0.7.5: This module has been superseded by the multiformats module
npm WARN tarball tarball data for bignumber.js#git+ssh://git#github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2 (sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for bignumber.js#git+ssh://git#github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2 (sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg==) seems to be corrupted. Trying again.
npm ERR! code EINTEGRITY
npm ERR! sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg== integrity checksum failed when using sha512: wanted sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg== but got sha512-k55rLoPK7DNCwjO/+Esh5n3lNF+lKwzfIIak1alqxXhrXsInC69JJKwEjAyCB8+IehSFkObzxzzu9URR+Q4pyA==. (63471 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ericm\AppData\Local\npm-cache\_logs\2021-09-14T17_35_53_844Z-debug.log
PS C:\Dev\eth>
You may have a package cached and it's failing the checksum comparison, you can try:
$ cd <project_directory>
$ rm -rf package-lock.json npm-shrinkwrap.json node_modules
$ npm cache clean --force
$ npm cache verify
$ npm install
or look here: When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
Since you're building something with Crypto I'd be extra cautious and ensure that this is in fact just an error/false positive and not a malicious package failing the checksum. Very low chance of the latter, but I'd pay a little extra attention at this step.
Figured it out. Looks like I had an issue with my Package-lock.json file within my project. Not sure what in particular caused the issue but deleting that folder and re-running npm install fixed my issue.

Npm audit fix --force does apply its own recommendations

there are plenty of similar questions but they have not helped me at all.
I try to get rid off critical vulnerabilities. I have run npm update, npm audit fix and npm audit fix --force many times but it is stalled. I see the same warnings again though the out says it is a fixable trouble. Is there a way to finish it?
>npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating update to 0.7.4,which is a SemVer major change.
npm WARN deprecated set-value#0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated set-value#0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
assign-deep <1.0.1
Severity: high
Prototype Pollution - https://npmjs.com/advisories/1014
fix available via `npm audit fix`
set-value <=2.0.0 || 3.0.0
Severity: high
Prototype Pollution - https://npmjs.com/advisories/1012
fix available via `npm audit fix --force`
Will install update#0.4.2, which is a breaking change
Update: I can see too much various versions (even 0.2) of set-value in package.json. I have set all occurences with the version <= 2.0 to 2.0.1. Tests passed through.
TL;DR: Try npm uninstall update.
Using the package.json in the repo that you linked to and npm#7, running npm install and then npm audit reported:
46 vulnerabilities (3 low, 11 moderate, 32 high)
Running npm audit fix didn't change that, which is indeed irksome, but also a known issue.
Running npm audit fix --force actually somehow made things worse:
55 vulnerabilities (9 low, 10 moderate, 36 high)
So I started over again with your package.json and ran npm install and npm audit again. The output for npm audit includes this:
set-value <=2.0.0 || 3.0.0
Severity: high
Prototype Pollution - https://npmjs.com/advisories/1012
fix available via `npm audit fix --force`
Will install update#0.7.4, which is a breaking change
So it wants to update the update module to version 0.7.4, which is the latest version. I did that manually like this:
npm uninstall update && npm install update
That got the same result (an increase in vulnerabilities) as npm audit fix --force but I did notice that after uninstalling update, 0 vulnerabilities were reported.
$ npm uninstall update
removed 584 packages, and audited 870 packages in 4s
56 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$
Looking at the npm page for update, it hasn't been updated itself in 5 years. So maybe replacing that package with something else is your best option here.
Back to your package.json, the update package is in your dependencies which seems wrong as it seems to be a command-line tool. A quick scan of the repo seems to indicate it's not actually used anywhere.
So I'm going to posit that the best solution is npm uninstall update.

can't solve deprecation warnings

Every time I install a new package or when I run npm audit fix (--force), I get deprecation warnings which are not getting fixed. I deleted package lock and tried everything but nothing works. Seems also to be a global error since it doesn't matter in which of my projects I do that. I try updating vue-cli which worked.
Does somebody have a solution to that?
Here are the warnings:
#hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: 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 har-validator#5.1.5: this library is no longer supported
npm WARN deprecated eslint-loader#2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
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 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 chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated html-webpack-plugin#3.2.0: 3.x is no longer supported
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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'

I am trying to install Parcel globally using the npm parcel -g command

I am trying to install Parcel globally using the npm parcel -g command and I get an error message when I use parcel index.html stating no entries found. What can I do to fix this?
Here is the command I enter to install parcel globally.
PS C:\Users\User\Desktop\Moshify> npm i -g parcel-bundler
npm WARN deprecated parcel-bundler#1.12.5: Parcel v1 is no longer maintained. Please migrate to v2, which is published under the 'parcel' package. See https://v2.parceljs.org/getting-started/migration for details.
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 tonpm 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 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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, 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 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.
C:\Users\User\AppData\Roaming\npm\parcel -> C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\bin\cli.js
parcel-bundler#1.12.5 postinstall C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler
node -e "console.log('\u001b[35m\u001b[1mLove Parcel? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/parcel/donate\u001b[0m')"
Love Parcel? You can now donate to our open collective:
https://opencollective.com/parcel/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\parcel-bundler\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
parcel-bundler#1.12.5
updated 1 package in 25.129s
Here is where I try to call the server and the error message I am getting.
PS C:\Users\User\Desktop\Moshify> parcel index.html
Server running at http://localhost:1234
× No entries found.
at Bundler.bundle (C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\src\Bundler.js:275:17)
at async Bundler.serve (C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\src\Bundler.js:842:7)
at async Command.bundle (C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\src\cli.js:241:20)
At first you need to initialize you npm package for package.json file.
using that command npm init -yes . Create a default package.json file.
Then need to install it globally using this command :
npm install parcel-bundler -g
Also you can try to save it in your package.json file.
npm install parcel-bundler -g --save-dev

creating a new Angular project

im trying to create a new Angular project, but im getting this error. i have installed an updated node also.
- Installing packages...
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/socket.io-adapter failed, reason: connect ETIMEDOUT 104.16.23.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 har-validator#5.1.5: this library is no longer supported
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 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
npm ERR! Unexpected end of JSON input while parsing near '...\r\n-----END PGP SIGN'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AUGUST\AppData\Roaming\npm-cache\_logs\2020-08-13T07_26_40_996Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.
Are you using ng new? What is your ng --version, are you sure you are up-to-date with Angular CLI as well? (Also, you should use at least Node LTS version (12.18 at the moment), check with node -v).
Also, try cleaning your cache:
npm cache clean --force
then try the command again.

Categories

Resources