Semantic-ui install fail npm - javascript

I get the following error when trying to install semantic-ui via npm for fresh project.
$ node -v
v16.14.0
$ npm -v
8.10.0
$ npm i semantic-ui
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 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 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 chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm ERR! code 1
npm ERR! path /home/indikau/workspace/learning/web_design/semantic_ui/Tutorial/13_theming/node_modules/semantic-ui
npm ERR! command failed
npm ERR! command sh -c gulp install
npm ERR! Error [ERR_REQUIRE_ESM]: require() of ES Module /home/indikau/workspace/learning/web_design/semantic_ui/Tutorial/13_theming/node_modules/del/index.js from /home/indikau/workspace/learning/web_design/semantic_ui/Tutorial/13_theming/node_modules/semantic-ui/tasks/clean.js not supported.
npm ERR! Instead change the require of index.js in /home/indikau/workspace/learning/web_design/semantic_ui/Tutorial/13_theming/node_modules/semantic-ui/tasks/clean.js to a dynamic import() which is available in all CommonJS modules.
npm ERR! at Object.<anonymous> (/home/indikau/workspace/learning/web_design/semantic_ui/Tutorial/13_theming/node_modules/semantic-ui/tasks/clean.js:8:12)
npm ERR! at Object.<anonymous> (/home/indikau/workspace/learning/web_design/semantic_ui/Tutorial/13_theming/node_modules/semantic-ui/gulpfile.js:21:18)
npm ERR! at async Promise.all (index 0) {
npm ERR! code: 'ERR_REQUIRE_ESM'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /home/indikau/.npm/_logs/2022-10-20T01_40_53_411Z-debug-0.log

This is related to the del package being updated to ESM-only. You can fix this by forcing a resolution of del#6.1 (rather than 7.x) in your package.json.
I use yarn which has this built in. I believe you must use a package like this for npm https://github.com/rogeriochaves/npm-force-resolutions.

Related

How to install Swagger in Nestjs?

i can't install swagger in my nestjs application. When I try, I get a Error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test.api#0.0.1
npm ERR! Found: #nestjs/common#8.4.7
npm ERR! node_modules/#nestjs/common
npm ERR! #nestjs/common#"^8.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #nestjs/common#"^9.0.0" from #nestjs/swagger#6.0.1
npm ERR! node_modules/#nestjs/swagger
npm ERR! dev #nestjs/swagger#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Jakub\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jakub\AppData\Local\npm- cache\_logs\2022-07-10T11_03_48_876Z-debug-0.log
How to resolve this?
NestJS 9 was recently released (2 days ago).
https://trilon.io/blog/nestjs-9-is-now-available.
Changes have been made to the #nestjs/swagger package. You are installing the latest version which has peer dependencies on NestJS 9 while your project is still on version 8.4.7.
The error is saying it cannot resolve the requested peer dependency #nestjs/common#^9.0.0. It does find #nestjs/common#8.4.7 instead, but that's not compatible.
Either upgrade NestJS or install an older version of the #nestjs/swagger package that is compatible with the NestJS version your application uses. Version 5.2.1 should work for you.
yarn add #nestjs/swagger#5.2.1
OR
npm i #nestjs/swagger#5.2.1

Can't install opensea-js with NPM

I am currently using Node v14.16.0 and NPM v7.7.5 to install opensea-js as a dependency in a project.
I try to run the command npm install --save opensea-js, but I always end up with an error. I tried to clean NPM's cache, I have even reinstalled Node. I am on Windows. The stack trace is the following:
PS C:\multi-sender-opensea-js> npm install opensea-js
npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
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 resolve-url#0.2.1: https://github.com/lydell/resolve-url#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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bignumber.js#6.0.0: Custom ALPHABET bug fixed in v7.0.2
npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
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 core-js#2.6.12: 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 core-js#2.6.12: 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! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\aguay\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\aguay\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm ERR! npm WARN deprecated har-validator#5.1.3: this library is no longer supported
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated debug#3.2.6: 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 ERR! npm WARN deprecated chokidar#2.1.6: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! 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 ERR! npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated bignumber.js#6.0.0: Custom ALPHABET bug fixed in v7.0.2
npm ERR! npm WARN deprecated buffer#4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm ERR! npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ProjectWyvern/ethereumjs-abi.git (sha512-yLrVA0M7LdolTGm4Eeh+SOffugSViZY9z/j5ctseZn5jTBJ5DAbyZ3vu1lQzHhbTSI2KpzEbKnfkT8LeNZSgog==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ethereumjs/ethereumjs-abi.git (sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ProjectWyvern/ethereumjs-abi.git (sha512-yLrVA0M7LdolTGm4Eeh+SOffugSViZY9z/j5ctseZn5jTBJ5DAbyZ3vu1lQzHhbTSI2KpzEbKnfkT8LeNZSgog==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ethereumjs/ethereumjs-abi.git (sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for bignumber.js#git+ssh://git#github.com/frozeman/bignumber.js-nolookahead.git (sha512-BPWfW6xhAeth4aWLg1g++Nrkn5KN+iqMsKQAdr/IywRCyBSjQ9JnyL49/Z3wgj2O/uW47RlYI2XPbJTKSoaVkw==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for bignumber.js#git+ssh://git#github.com/frozeman/bignumber.js-nolookahead.git (sha512-BPWfW6xhAeth4aWLg1g++Nrkn5KN+iqMsKQAdr/IywRCyBSjQ9JnyL49/Z3wgj2O/uW47RlYI2XPbJTKSoaVkw==) seems to be corrupted. Trying again.
npm ERR! npm WARN deprecated core-js#2.6.9: 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! npm ERR! code EINTEGRITY
npm ERR! npm ERR! sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA== integrity checksum failed when using sha512:
wanted sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA== but got sha512-IA4lM/EAhHCmgR0uepm5PJ4b5/zcONaHZbBVlPbSbPT2+Mqbhj01vl11bupQPovWF6gHA3cDNkanFuaD3LTh5Q==. (13945 bytes)
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\aguay\AppData\Local\npm-cache\_logs\2021-03-26T20_11_41_637Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aguay\AppData\Local\npm-cache\_logs\2021-03-26T20_11_45_803Z-debug.log
Does someone have an idea how I can solve this? Thank you in advance!
Try switching to Node.js version 8.11 to make sure common crypto dependencies work.
Execute nvm use, if you have Node Version Manager.
Try installing web3
from the opensea-js npm page

I am installing polymer in visual studio code but there are many errors I am getting a lot of errors

C:\Program Files\nodejs>npm install -g bower
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
C:\Users\Deepanshi\AppData\Roaming\npm\bower -> C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\bower\bin\bower
bower#1.8.8
added 1 package from 1 contributor in 14.243s
C:\Program Files\nodejs>npm install -g polymer-cli#next
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\polymer-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code EEXIST
npm ERR! path C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js
npm ERR! dest C:\Users\Deepanshi\AppData\Roaming\npm\polymer
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js' -> 'C:\Users\Deepanshi\AppData\Roaming\npm\polymer'
npm ERR! File exists: C:\Users\Deepanshi\AppData\Roaming\npm\polymer
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\Deepanshi\AppData\Roaming\npm-cache_logs\2020-10-07T12_56_44_680Z-debug.log
Try this :
npm i -g --force npm (note the --force flag)
If your output is get running npm install -g npm:
You can fix it with "brew reinstall node"
So :
brew reinstall node
npm i -g --force npm

npm WARN deprecated when running 'vue init webpack my-project'

My Goal:wanna initialize Vue.js project by running commands vue init webpack myproject
Expected Result: install all the dependencies with no fatal error, AND would be able to start running the project by npm dev run,and run project on http://localhost:8080
ACTUAL Result:
# Installing project dependencies ...
# ========================
npm WARN deprecated extract-text-webpack-plugin#3.0.2: Deprecated. Please use https://gi
thub.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browsersli
st >3.0 config used in other tools.
npm WARN deprecated bfj-node4#5.3.1: Switch to the `bfj` package for fixes and new featu
res!
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommend
ed for usage due to the number of issues. Please, upgrade your dependencies to the actua
l version of core-js#3.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslis
t >3.0 config used in other tools.
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is
its successor.
npm ERR! Unexpected end of JSON input while parsing near '...,"dist":{"shasum":"1e'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-12T06_01_01_
430Z-debug.log
Running eslint --fix to comply with chosen preset rules...
# ========================
> travel#1.0.0 lint F:\SourceCode\Travel-master\Travel
> eslint --ext .js,.vue src "--fix"
Oops! Something went wrong! :(
ESLint: 6.8.0.
ESLint couldn't find the plugin "eslint-plugin-vue".
(The package "eslint-plugin-vue" was not found when loaded as a Node module from the dir
ectory "F:\SourceCode\Travel-master\Travel".)
It's likely that the plugin isn't installed correctly. Try reinstalling by running the f
ollowing:
npm install eslint-plugin-vue#latest --save-dev
The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js".
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslin
t to chat with the team.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! travel#1.0.0 lint: `eslint --ext .js,.vue src "--fix"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the travel#1.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging out
put above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-12T06_01_04_
492Z-debug.log
# Project initialization finished!
# ========================
To get started:
cd Travel
npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack
What I've tried
run the commands like above mentioned npm install eslint-plugin-vue#latest --save-dev,then comes another issue like below:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for eslint-plugin-vue#lastest.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-12T06_09_11_
766Z-debug.log
even I tried the npm install webpack -dev-server -g,then comes another issue like below:
C:\Program Files\nodejs\webpack -> C:\Program Files\nodejs\node_modules\webpack\bin\webp
ack.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules\webpack\no
de_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11:
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ webpack#4.41.6
added 322 packages from 197 contributors in 255.517s
I had the same problem when coding my app (MEVN) and using the command vue init webpack client.
So I did a bit of research notably on npm to see what was wrong and found this: https://www.npmjs.com/package/vue-cli so apparently you can't use this command anymore.
So if you wish to use the vue cli you need to install it trough npm install -g #vue/cli and then run vue create <dir name>
For further information you can look into the documentation: https://www.npmjs.com/package/#vue/cli with the documentation on the vuejs website: https://cli.vuejs.org/
Hope this helps and have fun coding

'lightercollective' is not recognized as an internal or external command, operable program or batch file

I have installed webpack now I am trying to install webpack-cli but following errors occur:
$ npm i --save-dev webpack-cli
> webpack-cli#3.2.1 postinstall D:\Development\Practices\sample\starter\node_modules\webpack-cli
> lightercollective
'lightercollective' is not recognized as an internal or external command,
operable program or batch file.
npm WARN starter#1.0.0 No description
npm WARN starter#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-cli#3.2.1 postinstall: `lightercollective`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-cli#3.2.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rajan\AppData\Roaming\npm-cache\_logs\2019-01-08T08_45_44_898Z-debug.log
Notes:
I have tried restarting my command line.
I have also tried npm cache clean --force
And googling about an hour.
Finally, what does that lightercollective is not recognized as.. in the above message means? Confused???
Install:
npm i -g lightercollective
They change stuff... you must specify version numbers when you get packages or it won't work in the future if there is some sort of a breaking change.
You can add lightercollective to your dependencies to solve the issue.
Official package page
"lightercollective": "^0.0.0"
Update webpack-cli: npm update webpack-cli --save-dev
In my situation, I went from 3.2.1 (which warned about "lightercollective") to 3.3.8. Seemed like the issue was resolved.

Categories

Resources