Got warnings while installing Eslint in Atom editor - node.js

I am using Atom editor for React native. I am trying to install eslint. But got some warnings while running npm install commannd.
Firstly I have install both linter-eslint and eslint packages in Atom.
I have created a file .eslintrc and put below piece of code
{
“extends”: “eslint-config-google”
}
I have run the command npm install --save-dev eslint-config-rallycoding from root level of my project. But got below warnings and eslint is not working as well.
npm WARN deprecated eslint-plugin-class-property#1.1.0: please use eslint-plugin-babel and babel/semi
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN rollback Rolling back node-pre-gyp#0.12.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'D:\ReactNative\albums\node_modules\fsevents\node_modules'
npm WARN acorn-jsx#5.0.1 requires a peer of acorn#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y#2.2.3 requires a peer of eslint#^2.10.2 || 3.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import#1.16.0 requires a peer of eslint#2.x - 3.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react#6.10.3 requires a peer of eslint#^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I have also tried to uninstall packages and re-install them but its not working.

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 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?

Getting warnings while installing npm

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

Not able to install angularfire2 via npm

I am trying to install angularfire2 from npm by running, but I keep getting this error
D:\angular\firebase\apartment>npm install angularfire2 firebase --save
apartment#0.0.0 D:\angular\firebase\apartment
+-- angularfire2#4.0.0-rc.1
`-- firebase#4.1.3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\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"})
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/common#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/compiler#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/core#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/platform-browser#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/platform-browser-dynamic#^4.0.0 but none was installed.
Last 5 of npm warn's are due to dependencies. You don't have the required modules to install angularfire.
Two possible solutions are, either downgrade your npm i.e. lower than 3.
npm < 3 can download the depending modules by itself or install the 5 depending modules first.

Resources