Installing React project as symlink shows vulnerability warnings - node.js

I'm trying to share React components between a web project and desktop project. I found this article that details how to do so while not ejecting from create-react-app.
https://medium.com/capriza-engineering/sharing-source-code-and-libraries-in-react-bd30926df312
In short, it says:
- Create two React projects with CRA, one with the shared components and another that will be consuming them.
- Install the shared project in the consumer project as a symlink with npm install "../shared-project".
- Use react-app-rewired and customize-cra to make Babel compile everything in the common folder.
Although, after using npm install "../shared-project" I get the following:
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated flatten#1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\jest.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\jest
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\jest as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\jest
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\rimraf.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\rimraf
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\rimraf as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\rimraf
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\svgo.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\svgo
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\svgo as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\svgo
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\js-yaml.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\js-yaml
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\js-yaml as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\js-yaml
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\browserslist.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\browserslist
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\browserslist as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\browserslist
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\semver.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\semver
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\semver as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\semver
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esparse.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esvalidate.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esvalidate as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esparse as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
> core-js#2.6.9 postinstall D:\Projects--Tests\Project\web\node_modules\babel-runtime\node_modules\core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> core-js#3.1.4 postinstall D:\Projects--Tests\Project\web\node_modules\core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.4 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.7 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
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"})
+ shared#0.1.0
added 126 packages from 43 contributors, removed 190 packages, updated 1297 packages and audited 1794232 packages in 314.002s
found 14108 vulnerabilities (3 moderate, 14104 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
If I continue with the steps detailed above everything works but what worries me the most is the 3 moderate, 14104 high, 1 critical message. I don't what to look past it. Any idea how can I fix this?
Thanks in advance!

Related

"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.)

How can someone deal with webpack versions issues « requires a peer of ... but none is installed »?

First I receive this error: optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 then I try with this: npm i optimize-css-assets-webpack-plugin#latest but got that message: terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0
I am seeking for a specific answer to my problem but I think it would be useful also for everyone else to have a general way of thinking about how to deal with similar issues from any other NPM packages
I have this general issue as I am trying to use °NEST JS° & °REACT° & °MY TS WORKFLOW° in the same repo...
I don't know if I have to drill down each possible dependency tree or If I have to open multiple issues or if I have to take care of these problems myself (alone)...
Below trying to get ZERO warning messages installing 3 versions of webpack next#5.0.0-rc.6 lates#5.4.0 and 4#4.44.2
npm install webpack#next # + webpack#5.0.0-rc.6
npm WARN babel-loader#8.1.0 requires a peer of webpack#>=2 but none is installed. You must install peer dependencies yourself.
npm WARN css-loader#5.0.1 requires a peer of webpack#^4.27.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-webpack-plugin#2.2.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN file-loader#6.2.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN html-webpack-plugin#4.5.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN mini-css-extract-plugin#1.3.0 requires a peer of webpack#^4.4.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-loader#4.0.4 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#10.0.5 requires a peer of webpack#^4.36.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN style-loader#2.0.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN url-loader#4.1.1 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.7.2 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#3.11.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-manifest-plugin#2.2.0 requires a peer of webpack#2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm WARN workbox-webpack-plugin#6.0.0-alpha.3 requires a peer of webpack#^4.4.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN terser-webpack-plugin#4.2.3 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm install webpack#latest # + webpack#5.4.0
npm WARN optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.7.2 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-manifest-plugin#2.2.0 requires a peer of webpack#2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm install webpack#4 # + webpack#4.44.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 notsup Unsupported engine for watchpack-chokidar2#2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"15.1.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2#2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (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":"linux","arch":"x64"})
npm WARN terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0 but none is installed. You must install peer dependencies yourself.
You appear to have an incompatible set of packages. I'm not sure about the syntax, my experience is with composer. If you look though that list you will see most of your packages require either a v4 OR v5:
npm WARN mini-css-extract-plugin#1.3.0 requires a peer of webpack#^4.4.0 || ^5.0.0 ...
You have one package that requires a v4 exclusively and another requires a v5 exclusively
npm WARN optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 ...
npm WARN terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0 ...

Vulnerabilities appears npm install npm audit npm audit fix --force in windows 10 , npm 6.4.1 node v10.13.0

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
Moderate Prototype Pollution
Package hoek
Patched in > 4.2.0 < 5.0.0 || >= 5.0.3
Dependency of otp.js [dev]
Path otp.js > joi > hoek
More info https://nodesecurity.io/advisories/566
Low Denial of Service
Package mem
Patched in >=4.0.0
Dependency of react-native
Path react-native > #react-native-community/cli > metro >
metro-inspector-proxy > yargs > os-locale > mem
More info https://nodesecurity.io/advisories/1084
.......
npm audit fix --force
Error:
npm WARN using --force I sure hope you know what you are doing.
npm WARN commonmark-react-renderer#4.3.4 requires a peer of commonmark#^0.27.0 || ^0.26.0 || ^0.24.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb#17.1.1 requires a peer of eslint#^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb-base#13.2.0 requires a peer of eslint#^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native#3.7.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN jsdom#15.2.1 requires a peer of canvas#^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.3 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.3 requires a peer of utf-8-validate#^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-fast-image#7.0.2 requires a peer of react-native#^0.60.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-keyboard-input#5.4.1 requires a peer of react-native#^0.57.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-responsive-ui#1.1.1 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-responsive-ui#1.1.1 requires a peer of react-native#^0.43.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-drawer#1.4.0 requires a peer of react-native-screens#^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-stack#1.10.3 requires a peer of react-native-screens#^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself
>
>
up to date in 20.457s
fixed 0 of 6 vulnerabilities in 1710074 scanned packages
6 vulnerabilities required manual review and could not be updated
anyone could help plz????
problem was with 'npm install' and 'npm yarn install'
This helped me
'choco install yarn'
'cd project_folder'
'yarn global add react-native-cli'
'yarn'

NPM unmet peer dependency on every package i try to install

I am very new to the frustrating world of NPM.
I have run create-react-app, it installs except for the following warning messages
yarn add v1.17.3
[1/4] Resolving packages...
warning react-scripts > fsevents#2.0.6: Please update: there are crash fixes
[2/4] Fetching packages...
info fsevents#1.2.9: The platform "linux" is incompatible with this module.
info "fsevents#1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.0.6: The platform "linux" is incompatible with this module.
info "fsevents#2.0.6" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin#1.6.0" has unmet peer dependency "typescript#*".
warning "react-scripts > #typescript-eslint/parser#1.6.0" has unmet peer dependency "typescript#*".
warning "react-scripts > #typescript-eslint/eslint-plugin > #typescript-eslint/typescript-estree#1.6.0" has unmet peer dependency "typescript#*".
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.10.0" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 11 new dependencies.
Once it goes through to the end, if i try to install another package (any package) i.e npm install bootstrap --save i keep getting errors like;
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated flatten#1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated fsevents#2.0.6: Please update: there are crash fixes
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/jest as it wasn't installed by /home/vagrant/admin/node_modules/jest
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/uglifyjs as it wasn't installed by /home/vagrant/admin/node_modules/uglify-js
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/semver as it wasn't installed by /home/vagrant/admin/node_modules/semver
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/esparse as it wasn't installed by /home/vagrant/admin/node_modules/esprima
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/esvalidate as it wasn't installed by /home/vagrant/admin/node_modules/esprima
npm WARN bootstrap#4.3.1 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#4.3.1 requires a peer of popper.js#^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.6.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.6.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/typescript-estree#1.6.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.15.0 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm ERR! path /home/vagrant/admin/node_modules/#hapi/topo/node_modules/#hapi/hoek/package.json.1181420959
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/admin/node_modules/#hapi/topo/node_modules/#hapi/hoek/package.json.1181420959'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2019-08-05T11_56_29_110Z-debug.log
I have tried updating the packages using `npm -g update. But still nothing
Any help would be greatly appreciated, its driving me NUTS!
There are a number of packages on npm that attempt to solve this very problem in different ways. I've used npx npm-install-peers in the past, but I had to run it again after every new install, as the peer dependencies were wiped out on every normal npm install.
Edit: you might want to add npm-install-peers to both postinstall and postuninstall scripts so you don't have to do it manually each time you (un)install something.
I just ran:
npm install typescript
to install the latest and now I don't see that peer package error. You could also install it global, I suppose:
npm install -g typescript
which would most certainly work just the same.

UNMET PEER DEPENDENCY webpack#3.5.5 and babel-loader error

I'm having trouble installing webpack dev with the following command: npm i --save-dev webpack
Webpack is installed succesfully on my computer as npm i webpack -g #3.5.5 so no issues here.
When I run npm i --save-dev webpack I get a babel-core error reading the following; it will not let me proceed without usinf webpack 1, 2 pr 2.1.0-beta
I cannot get past this and have search stackoverflow and multiple sites.
In my situation, I'm using it with Redux on Windows.
This is my error.
`-- UNMET PEER DEPENDENCY webpack#3.5.5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\ch
okidar\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 babel-loader#6.2.10 requires a peer of webpack#1 || 2 || ^2.1.0-beta ||
^2.2.0-rc but none was installed.
npm WARN prj400r#1.0.0 No description
npm WARN prj400r#1.0.0 No repository field.
Highlighting the babel-core error as being the most problematic. Any workaround?
Update babel-loader to version 7.x.x and it should solve your problem. The previous versions required webpack 1 and this support was dropped in version 7
Release v7.0.0

Resources