Cant install colorthief - npm

I ran into somewhat of a problem while trying to run
npm i colorthief
I get many error messages, among them:
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.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! git dep preparation failed
Is this library no longer supported?

You should try to import it from a CDN rather than installing it as an NPM dependency:
import ColorThief from "https://cdnjs.cloudflare.com/ajax/libs/color-thief/2.3.0/color-thief.umd.js";

Related

npm install errors project on vue#2 and nuxt [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 months ago.
Improve this question
I have purchased a paid template named vie from Envato market. npm install command gives the errors mentioned below.
npm WARN deprecated #npmcli/move-file#1.1.2: This functionality has been moved to #npmcli/fs
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated particles.vue#2.43.1: Version 2.x is the current version, v1 is obsolete now
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#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 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 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.23.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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated tsparticles#1.43.1: tsParticles 2.6.0 is out, please update
npm ERR! code 255
npm ERR! path C:\Users\User\Desktop\Data\Templates\xyz\Main_files\project_name\node_modules\swiper
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\User\AppData\Local\Temp\postinstall675294575.cmd
npm ERR! "Love Swiper? Support Vladimir's work by donating or pledging on patreon:
npm ERR! The syntax of the command is incorrect.
It's just warning messages (not errors) due to some outdated NPM dependencies.
You can run the npm outdated command in your terminal to check which ones can be updated.
Then update each outdated version in your package.json file and run the npm install command again.

npm install -g #vue/cli but INSTALL ERROR

This is my environment..
MacOs Big Sur version 11.2.3
npm version 7.15.1
node version version 16.3.0
Below is my error..
npm WARN deprecated #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 resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
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 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'
changed 943 packages, and audited 944 packages in 16s
59 packages are looking for funding
run `npm fund` for details
13 vulnerabilities (3 moderate, 10 high)
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
I try again and again.. but it's not work.
Please help me!!
We miss a few infos here; you say that you get an install error, but these are just warnings about deprecated dependencies. Moreover, these dependencies doens’t look much related to #vue/cli itself…
Are these globally installed dependencies? You might wanna use npm-check and use it globally to see if these are old global dependencies that you should get uptodate (or get rid of):
$ npm-check -ug
I have resolved in this method:
npm uninstall –g #ionic/cli
install nodejs
Reinstall again: npm install –g #ionic/cli
For Mac users
First, Uninstall angular/cli: sudo npm uninstall -g #angular/cli
Then, go to https://www.brew.sh/ and copy the link below Install Homebrew and paste it to the terminal and hit enter.
Then, type: brew install angular-cli and hit enter.
Finally, check the version: ng --version

trying to install vue cli using npm install -g #vue/cli but this error occurs

I am trying to install vue cli using npm install -g #vue/cli but this error occurs:
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/typescript (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\umage\AppData\Roaming\npm-cache\_logs\2020-10-17T16_20_00_242Z-debug.log
What could be the problem?

Uninstalling quasar-cli via npm not working?

I was working on a Quasar project on my windows machine and out of blue it is saying quasar is not recognized as an internal or external command.
I tried to uninstall quasar-cli with the command npm uninstall -g quasar-cli but it seems it is not working. npm list -g --depth=0 command tells me that I still have the quasar-cli.
C:\Users\nitin>npm uninstall -g quasar-cli
up to date in 0.028s
C:\Users\nitin>npm list -g --depth=0
C:\Users\nitin\AppData\Roaming\npm
+-- #quasar/cli#1.1.0
+-- cordova#9.0.0
+-- nodemon#2.0.4
`-- vue-cli#2.9.6
I am also not able to install it again as it gives the following errors
C:\Users\nitin>npm install -g quasar-cli
npm WARN deprecated #babel/preset-stage-2#7.0.0-beta.54: � We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
npm WARN deprecated chokidar#2.0.4: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated #babel/preset-stage-3#7.0.0-beta.54: � We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
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.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 chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
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).
npm WARN rollback Rolling back is-descriptor#1.0.2 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\node_modules\define-property\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.2 (node_modules\quasar-cli\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"})
npm WARN notsup Unsupported engine for watchpack-chokidar2#2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.17.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2#2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\quasar-cli\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ajv-keywords#3.5.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm ERR! code EEXIST
npm ERR! path C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\bin\quasar
npm ERR! dest C:\Users\nitin\AppData\Roaming\npm\quasar
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\bin\quasar' -> 'C:\Users\nitin\AppData\Roaming\npm\quasar'
npm ERR! File exists: C:\Users\nitin\AppData\Roaming\npm\quasar
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\nitin\AppData\Roaming\npm-cache\_logs\2020-07-19T04_24_31_029Z-debug.log
Can you please suggest where am I going wrong. I am new with npm and JS in general so please correct if I am missing something.
I've recently performed a manual delete for a similar issue I was facing, opting instead to use the rimraf package to delete a module from the npm root directory where global packages are installed.
Install rimraf using:
npm install rimraf -g
Navigate to the root folder of where the global packages are installed. Path to this can be found using:
npm root -g
Once you've cd' into the root folder perform the delete on the quasar-cli module using:
rimraf <name of folder>
Note:
<name of folder> is the name of the folder quasar-cli is contained within. Perform a dir/w to list the folder in the directory to check the exact name of the folder to insert in the command above.
The rimraf package is a cross-platform equivalent of what I use in the bash terminal rm -rf to recursively delete files and folders. You can see this in action on windows via: https://www.youtube.com/watch?v=qPCK6mWeqsk
Check that the removal of the package as per your previous command:
npm list -g --depth=0
Hope that helps
I ultimately had to delete the node-modules folder from
C:\Users\{user}\AppData\Roaming\npm\node_modules
as I was having issue not only with quasar but also with vue and everything else.
vue --version also wasn't working.
I deleted the node-modules folder from the above path and also from my project folder and then re-installed them using npm install -g command. This command needs to be run in your project folder where you have your package.json file.
Else you can individually install(globally using the -g appended to the command) each component of your need.
Restart the command prompt after installing the packages.
Don't forget to keep a list of all the packages you have using
npm list -g --depth=0`
Try this
npm uninstall -g #quasar/cli

Unable to install npm in Windows. Already installed node#12

npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated natives#1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs#4.x.
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 es6-collections#0.5.6: not actively maintained anymore
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated core-js#1.2.7: 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.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
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 kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated graceful-fs#1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
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 ERR! Unexpected end of JSON input while parsing near '...MHnnvXS5o2QG0zee9aDVU'
npm ERR! A complete log of this run can be found in:
i have same problem.
it's fixed by updating npm and nodejs to latest version.
to update npm use this command:
npm i -g npm#latest
and for nodejs, you can download it manually from nodejs website:
https://nodejs.org/en/download/