React-native-fs peer dependency with RN? - react-native

npm WARN react-native-fs#2.16.6 requires a peer of react-native#^0.59.5 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-fs#2.16.6 requires a peer of react-native-windows#^0.57.2 but none is installed. You must install peer dependencies yourself.
When I run npm install these two warning appear. I know that I can solve the second by running npm install react-native-windows but I am not sure how to fix the first one.
I currently have react-native 0.63.3 running. If I try to downgrade to 0.59.5 I get a host of other issues.
Here on the react-native-fs npmjs instructions it lists that this version of reat-native-fs should be used for RN > 0.61 which only adds to my confusion as to why this isn't working.
I can provide any other files that may be of importance. Thank you for the help!

I did "npm install --save react-native-fs --legacy-peer-deps" and "react-native link react-native-fs"
And the module works fine for me.

Related

npx webpack insists on installing webpack-cli but its already installed

I am attempting to run the command:
npx webpack
It tells me it needs webpack-cli and asks if it should install it, I say 'yes'. Then it gives me:
PS C:\_ljdev\webpack demo> npx webpack
npx: installed 321 in 11.89s
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN webpack-cli#3.2.3 requires a peer of webpack#4.x.x but none is installed. You must install peer dependencies yourself.
+ webpack-cli#3.2.3
updated 1 package and audited 1053 packages in 2.093s
found 0 vulnerabilities
{ Error: Cannot find module 'webpack-cli'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at runCommand.then (C:\Users\luke.jenner\AppData\Roaming\npm-cache\_npx\3272\node_modules\webpack\bin\webpack.js:143:5)
at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
So I attempt to install it locally, manually via:
PS C:\_ljdev\webpack demo> npm install webpack-cli
npm WARN webpack-cli#3.2.3 requires a peer of webpack#4.x.x but none is installed. You must install peer dependencies yourself.
+ webpack-cli#3.2.3
updated 1 package and audited 1053 packages in 8.034s
found 0 vulnerabilities
And I check that it is installed using:
PS C:\_ljdev\webpack demo> npm list
webpack-demo#1.0.0 C:\_ljdev\webpack demo
`-- webpack-cli#3.2.3
+-- chalk#2.4.2
| +-- ansi-styles#3.2.1
(other dependencies omitted for brevity)
So it appears installed.
I try npx webpack again and get the exact same output and question to install webpack-cli again.
Can anyone tell me why it's not finding the webpack-cli local install? Does it have to be installed globally?
Or more curiously: why does it fail when it tries to install it itself?
I have hit this error just recently.
Deleting the node_modules folder and reinstalling the dependencies with npm i made the npx webpack ... command work again. Can't really say why...
I have encountered the same problem.
After half a day of testing, I finally found out that there are special characters in my project path. Remove them, re-run npx webpack and everything is OK.
There is a space in your project path, maybe you can remove it and re-try.
click here to verify my result
Edit:
Sorry, I didn't express clearly. I meant that there were special characters in the project path which would be converted into some others during the npm installation.
If you change your working directory name, such as from webpack-demo to webpack/demo, remove and re-install webpack and webpack-cli. Then open the package.json of webpack package in node_modules directory, you will find the _where attribute which contains local absolute path but is different from your current real project path.
I guess(probably not right, maybe some other method) that npx command will use the _where attribute to locate the webpack package. So if the path is wrong, npm will have a tip that you should install webpack-cli first. But even you re-install the webpack-cli, the other scripts still can't find it.
Try running npx webpack-cli instead of npx webpack.
You need to install webpack-cli locally first using npm install --save-dev webpack-cli.
Try installing webpack-cli globally.
npm i -g webpack-cli
Go through this issue on github.
https://github.com/webpack/webpack-cli/issues/299

npm - meaning of "Have you installed one of peer libraries?"

npm version: 5.6.0
While doing npm install [package] got the following sentence (warning?):
Have you installed one of peer libraries?
Is it a warning? What does it means?
Could not find it documented anywhere.
Example:
npm i material-ui-pickers
Have you installed one of peer libraries?
> date-fns
> luxon
> moment
+ material-ui-pickers#1.0.0-rc.9
updated 1 package in 77.671s
If you look at material-ui-pickers > package.json under you node_modules folder, you will see that the message is a post-install message. As Sebastiaan stated, it's simply material-ui-pickers advertising other modules or potential dependencies when the installation is complete.

Missing peer dependencies

I am new to npm and angular projects, and I am using bootstrap#4.1.1 in my package.json. When I do npm install, I get the following error -
bootstrap#4.1.1 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
Does this mean that I need to add jquery#1.9.1 - 3 to my package.json under peerDependencies section, apart from installing it locally with no-save option?
Also, do we need to install this missing peer dependency on the build server as well? Or can it be ignored?
Simply install the dependency yourself:
npm install jquery#1.9.1 --save
Although --save is optional I recommend to put it, so the next time you simply can type only npm install and both bootstrap and jquery will be installed. You can read about peer dependencies on npm documentation.
You should read the terminal whether all important dependencies have been installed. If it hasn't install those manually.
npm install <MISSING DEPENDANCY> --save
In your case
npm install jquery#1.9.1 --save
In addition to the given answers:
If npm warns you about a missing dependency with a version range like 1.9.1 - 3 then you should definitely use that range to manually install the dependency – and not only its lower boundary. Use quotes for the range to work as a parameter in the install command. Both of the following examples will work:
npm install jquery#"1.9.1 - 3"
npm install "jquery#1.9.1 - 3"
Also the parameter --save can be omitted as of npm v5.0. This is the default now when you install.

i try to install library for vue project and return error

I tried to install & execute old vue project.
The problem is when I execute npm install there are many errors.
I dont know why, because some time ago the projects worked without errors:
error file : https://gist.github.com/scaltro/5f6b04c3c1fa192989ddbb1c8707e233
I'm no npm guru, but this line seems to tell you what to do?
warn file-loader#1.1.5 requires a peer of webpack#^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
Try with:
npm install file-loader#1.1.5

npm generator-ionic Install Requires yo#>=1.0.0

I'm trying to install generator-ionic, and I get the following fatal error:
EPEERINVALID generator-ionic#0.7.3 requires a peer of yo#>=1.0.0 but none was installed
I'm using node 0.12.17, npm 3.3.6, and yo 1.4.7, so I do not understand what isn't satisfied.
#chrysanhy I think I found the issue. I just downgraded my npm version to 2.7.4 and when I ran the command npm install generator-ionic-g the following message appeared:
npm WARN peerDependencies The peer dependency yo#>=1.0.0 included from generator-ionic will no longer be automatically installed to fulfill the peerDependency in npm 3+. Your application will need to depend on it explicitly.
Now the ionic-generator is working fine on my machine. Hope this helps you and everyone who is facing the same problem.