I am currently trying to set up a Rails 6.0.2 application on Ubuntu 18.0.4 using Docker.
I have successfully set up the database using PostgreSQL
and I have installed the necessary gems by running the command below:
bundle install
However, when I try to install the node packages using the command below:
yarn install
I get the message below which gives me some concern that something is not right:
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^4.0.0".
I have tried a few solutions but it's not working. I need some help. Thank you.
Here's how I solved:
Simply run the command below to upgrade the version of yarn to your desired version:
yarn upgrade webpack@^4.0.0
Note: You can substitute 4.0.0
with the required version for yarn
, say 5.0.0
.
Another Solution
Add the version of webpack that you want to your package.json
file. Here the version of webpack used is 4.43.0
:
"devDependencies": {
"webpack": "^4.43.0",
"webpack-dev-server": "^3.11.0"
}
And then run yarn install
to install webpack
For Docker Applications only:
Add the command just before the yarn install
command in your Dockerfile
:
RUN yarn upgrade webpack@^4.0.0 \
yarn install
Reference to this on GitHub: Unmet peer dependencies
That's all.
I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With