Getting warnings while installing npm - node.js

npm WARN extract-text-webpack-plugin#1.0.1 requires a peer of webpack#^1.9.11 but none is installed. You must install peer dependencies yourself.
npm WARN karma-webpack#1.7.0 requires a peer of webpack#^1.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native#0.49.2 requires a peer of react#16.0.0-beta.5 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#3.2.0 requires a peer of webpack#^1.12.6 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#1.12.0 requires a peer of webpack#^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#2.0.0-beta requires a peer of webpack#>=2.0.3-beta <3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I'm getting above mentioned warnings while doing npm install. Although, these are just warnings and are not gonna impact application. But, I want to know what is leading to these warnings.
I am using npm `version 5.4.2`
node version is 6.11.4
webpack 2.1.0-beta.22

first of all last 2 warnings are just for those user who are using
other than mac.(Even I wasn't able to resolve them)
Now coming to other warnings.
you can either downgrade your webpack version or upgrade everything to latest versions.
They are compatible with each other as I have also done that.
In my opinion upgrading all your components is a better way to solve this.
This module will be helpful while upgrading it npm-check

Related

I'm trying to create a spfx environment, i ran command "npm i -g #microsoft/generator-sharepoint" and i returned with error "code EEXIST"

my node version is 10.13.0, i'm using this version because of a specific project dependency and i'm using my office laptop,
I'm also having
+-- gulp#4.0.2
+-- typescript#4.9.5
`-- yo#4.3.1
i want to install "npm i -g #microsoft/generator-sharepoint" but i'm getting error "code EEXIST"
I'm new to this so don't have much knowledge what is this and i'm working on this for 2 days still not able to fix it.
npm WARN deprecated uuid#3.1.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 read-package-tree#5.1.6: The functionality that this package provided is now in #npmcli/arborist
npm WARN deprecated readdir-scoped-modules#1.1.0: This functionality has been moved to #npmcli/fs
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
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 source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
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 querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated #npmcli/move-file#1.1.2: This functionality has been moved to #npmcli/fs
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.2 (node_modules\#microsoft\generator-sharepoint\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\#microsoft\generator-sharepoint\node_modules\watchpack-chokidar2\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\#microsoft\generator-sharepoint\node_modules\#rushstack\typings-generator\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 yeoman-generator#5.6.1 requires a peer of yeoman-environment#^3.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack4-module-minifier-plugin#0.9.31 requires a peer of #types/webpack#* but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack4-module-minifier-plugin#0.9.31 requires a peer of #types/webpack-sources#* but none is installed. You must install peer dependencies yourself.
npm WARN node-fetch#2.6.7 requires a peer of encoding#^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack4-localization-plugin#0.15.25 requires a peer of #types/webpack#^4.39.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/set-webpack-public-path-plugin#3.3.69 requires a peer of #types/webpack#^4.39.8 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/set-webpack-public-path-plugin#3.3.69 requires a peer of webpack#^5.35.1 but none is installed. You must install peer dependencies yourself.
npm WARN #microsoft/loader-load-themed-styles#1.9.174 requires a peer of #types/webpack#^4 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#8.0.2 requires a peer of node-sass#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#8.0.2 requires a peer of fibers#>= 3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-fetch#2.6.9 requires a peer of encoding#^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-fetch#2.6.7 requires a peer of encoding#^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack-plugin-utilities#0.1.36 requires a peer of #types/webpack#^4.39.8 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack-plugin-utilities#0.1.36 requires a peer of webpack#^5.35.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#8.12.0 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#8.12.0 requires a peer of utf-8-validate#>=5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-formats#2.1.1 requires a peer of ajv#^8.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\.bin\browserslist.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\.bin\browserslist.cmd: is outside C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\browserslist and not a link
npm ERR! File exists: C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\.bin\browserslist.cmd
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AryanSharma\AppData\Roaming\npm-cache\_logs\2023-02-02T09_55_50_116Z-debug.log
I want to create a new webpart but so many errors
as this error suggests: npm ERR! Move it away, and try again. Please Check whether you have installed the package in your environment, and then try to remove and reinstall it.
The version of the yeoman template you are trying to install is not compatible with NodeJs v10.13.1. Use the following command instead
npm i -g #microsoft/generator-sharepoint#1.12.1
The full list of SPFx compatibility can be found at https://learn.microsoft.com/en-us/sharepoint/dev/spfx/compatibility
From that list, you can see that SPFx v1.12.1 is the last version that supported NodeJs v10.x
Also, you should remove gulp from the global space and replace it with gulp-cli by running the following commands
npm uninstall - gulp
npm i -g gulp-cli
Having typescript installed is also unneeded, so that can be uninstalled.
Lastly, you can always ignore the WARN messages.
Good luck!
Good luck!Don
If my answer helps solve or resolve your issue, please consider clicking Mark as Best Response & Like. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it a Like.

"npm install #azure/msal-browser #azure/msal-angular#latest" but nothing inside of node_modules

I'm trying to include Azure AD for the login, but after running npm install #azure/msal-browser #azure/msal-angular aswell as npm install #azure/msal-browser #azure/msal-angular#latest no new entries in the node_modules folder can be seen. So when trying to import the modules
import { MsalModule } from '#azure/msal-angular';
import { PublicClientApplication } from '#azure/msal-browser';
I get the warning TS2307: Cannot find module '#azure/msal-browser' or its corresponding type declarations
When running the commands it seems to install everything (I run it where the frontend is located, also tried running it in the folder where both frontend and backend are stored):
npm WARN #angular/cdk#9.2.4 requires a peer of tslib#^1.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ant-design/icons-angular#9.0.1 requires a peer of #angular/common#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ant-design/icons-angular#9.0.1 requires a peer of #angular/core#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ant-design/icons-angular#9.0.1 requires a peer of #angular/platform-browser#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ant-design/icons-angular#9.0.1 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rollup/plugin-commonjs#15.1.0 requires a peer of rollup#^2.22.0 but none is installed. You must install peer dependencies yourself.
npm WARN codelyzer#5.2.2 requires a peer of #angular/compiler#>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN codelyzer#5.2.2 requires a peer of #angular/core#>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd#9.2.2 requires a peer of #angular/animations#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd#9.2.2 requires a peer of #angular/common#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd#9.2.2 requires a peer of #angular/forms#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd#9.2.2 requires a peer of #angular/core#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd#9.2.2 requires a peer of #angular/platform-browser#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd#9.2.2 requires a peer of #angular/router#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\watchpack-chokidar2\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\webpack-dev-server\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"})
+ #azure/msal-browser#2.20.0
+ #azure/msal-angular#2.0.6
updated 2 packages and audited 1717 packages in 11.119s
Pretty much the only way npm will install something in a directory other than ./node_modules is if global is set. Run npm config get global. If it prints true, then this is your problem.
Find out where global is set with npm config list. Find global = true in the output, then start looking in the lines above it for a line that looks like ; "user" config from /Users/trott/.npmrc. That line will tell you if the problem is in your user config, project config, or global config. You can try to use npm config delete global to remove the setting, but the global setting itself may be messing with that command. (I'm not actually sure of the cause. All I know is that I've experienced npm config delete global having no effect.) It might be best to run npm config edit to edit the config file to delete that line. (You can also use the path to open the file in the editor of your choice. Just be very careful not to make any changes other than removing the global setting line.)

npm audit: how to update high vulnerabilities for Jhipster

When I audit my vulnerabilities in jhipster 6.10.1 I find the following:
D:\JHipster\liquidbasetwo>npm audit
=== npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
Low Prototype Pollution
Package lodash
Patched in >=4.17.19
Dependency of generator-jhipster [dev]
Path generator-jhipster > jhipster-core > lodash
More info https://npmjs.com/advisories/1523
Low Prototype Pollution
Package lodash AND OTHER LIKE THIS ONE
High Remote Code Execution
Package serialize-javascript
Patched in >=3.1.0
Dependency of workbox-webpack-plugin [dev]
Path workbox-webpack-plugin > workbox-build >
rollup-plugin-terser > serialize-javascript
More info https://npmjs.com/advisories/1548
found 5 vulnerabilities (4 low, 1 high) in 2556 scanned packages
5 vulnerabilities require manual review. See the full report for details.
So I try to update: npm install serialize-javascript, which gives me lots of warnings and a high vulnerability that do not disappear:
D:\JHipster\liquidbasetwo>npm install serialize-javascript
npm WARN #angular/compiler#9.1.11 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/compiler-cli#10.0.0 requires a peer of #angular/compiler#10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/localize#10.0.0 requires a peer of #angular/compiler#10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/platform-browser-dynamic#10.0.0 requires a peer of #angular/compiler#10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #fortawesome/angular-fontawesome#0.6.1 requires a peer of #angular/core#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #fortawesome/angular-fontawesome#0.6.1 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ng-bootstrap/ng-bootstrap#6.1.0 requires a peer of #angular/common#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ng-bootstrap/ng-bootstrap#6.1.0 requires a peer of #angular/core#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ng-bootstrap/ng-bootstrap#6.1.0 requires a peer of #angular/forms#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ng-bootstrap/ng-bootstrap#6.1.0 requires a peer of #angular/localize#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ng-bootstrap/ng-bootstrap#6.1.0 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ngx-translate/core#12.1.2 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ngx-translate/http-loader#5.0.0 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#4.5.0 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#4.5.0 requires a peer of popper.js#^1.16.0 but none is installed. You must install peer dependencies yourself.
npm WARN codelyzer#5.2.2 requires a peer of #angular/core#>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-cookie-service#3.0.4 requires a peer of #angular/common#^9.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-cookie-service#3.0.4 requires a peer of #angular/core#^9.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-cookie-service#3.0.4 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-webstorage#5.0.0 requires a peer of #angular/common#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-webstorage#5.0.0 requires a peer of #angular/core#^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-webstorage#5.0.0 requires a peer of tslib#^1.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\webpack-dev-server\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\watchpack-chokidar2\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (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"})
And then some others again in a circular reference. Is there a way to stop all this and fix all vulnerabilities at once?
Thanks

Why does bootstrap-vue require me to install jquery and webpack manually, even though I have them installed globally?

Im setting up a new bootstrap-vue project using vue-cli by running the command
vue init bootstrap-vue/webpack-simple my-project.
Each time I start a new project, I have to install all the dependencies in the output below by hand.
Am I missing something?
I already have installed jquery/webpack etc globally using npm install -g webpack but whenever I run the command I get the following output:
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is
installed. You must install peer dependencies yourself.
npm WARN babel-loader#6.4.1 requires a peer of webpack#1 || 2 || ^2.1.0-
beta || ^2.2.0-rc but none is installed. You must install peer
dependencies
yourself.
npm WARN bootstrap#4.2.1 requires a peer of jquery#1.9.1 - 3 but none is
installed. You must install peer dependencies yourself.
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"})
Im pretty new to understanding npm and js dependency management, and it just doesn't make sense that every time I spawn up a new project, I have to manually go down the line and install the various dependencies by hand. Am I missing something?

NPM Warnings "eslint X requires a peer of Y but none is installed. You must install peer dependencies yourself."

Whenever I install a package I keep getting these npm warnings regarding eslint. I've tried every form of installing the latest version of eslint and babel-eslint that I can think of, but the same warning messages show every time. For instance if I run
npm i babel-eslint
The follwing shows:
npm WARN eslint-config-react-app#2.1.0 requires a peer of babel-eslint#^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#2.1.0 requires a peer of eslint#^4.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-loader#1.9.0 requires a peer of eslint#>=1.6.0 <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y#5.1.1 requires a peer of eslint#^2.10.2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN firebase-functions#2.1.0 requires a peer of firebase-admin#~6.0.0 but none is installed. You must install peer dependencies yourself.
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"})
Despite the warnings it shows that the package added. But if it's added then why do those warnings persist?
babel-eslint#10.0.1
removed 181 packages and updated 1 package in 50.436s
One thing I notice whenever I install via NPM is that at first the first line of the console shows
[..................] - rollbackFailedOptional: verb npm-session 1b360c8942244b42
Although it does go on to install the package, with those subsequent warning errors. Could anyone suggest a reason for all these errors and a possible way to fix them?

Resources