18 days ago
I have an error that I need to add --force to a command
//time picker
npm i ngx-mat-timepicker@17.1.0 --force
It works in my local development
npm error
npm error While resolving: @angular/material-moment-adapter@17.3.8
npm error Found: @angular/material@17.3.10
npm error node_modules/@angular/material
npm error @angular/material@"^17.3.10" from the root project
npm error peer @angular/material@"^17.0.0" from ngx-mat-timepicker@17.1.0
npm error node_modules/ngx-mat-timepicker
npm error ngx-mat-timepicker@"^17.1.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @angular/material@"17.3.8" from @angular/material-moment-adapter@17.3.8
npm error node_modules/@angular/material-moment-adapter
npm error @angular/material-moment-adapter@"^17.3.8" from the root project
npm error
npm error Conflicting peer dependency: @angular/material@17.3.8
npm error node_modules/@angular/material
npm error peer @angular/material@"17.3.8" from @angular/material-moment-adapter@17.3.8
npm error node_modules/@angular/material-moment-adapter
npm error @angular/material-moment-adapter@"^17.3.8" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
10 Replies
18 days ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
18 days ago
Are you sure you want to use --force in deployment?
if yes, you can modify it on service settings look for Custom Build Command .
starphoneswebtech
Are you sure you want to use --force in deployment?if yes, you can modify it on service settings look for Custom Build Command .
18 days ago
Yes, I really need this to work the library worked a couple a days back. This is my first time Im in this situation can you help me out and explain it step by step.
fcaceres98
Yes, I really need this to work the library worked a couple a days back. This is my first time Im in this situation can you help me out and explain it step by step.
18 days ago
go to service settings, scrolldown to the custom build command, npm install --force && npm run build
edit. just realize that you dont need this to run if you force installed it on your local.
starphoneswebtech
go to service settings, scrolldown to the custom build command, npm install --force && npm run buildedit. just realize that you dont need this to run if you force installed it on your local.
18 days ago
npm install ngx-mat-timepicker@17.1.0 --force && npm run build
Like that or just like you say, npm install --force && npm run build
18 days ago
oh, one thing you can do is, npm install --force to your local, commit your package.lock and push it
18 days ago
In my local it works when I push to my repository. I added the custom build command and the error is still their
18 days ago
hmm, i think its because of the dependency now
you need to align angular version.
your project has @angular/material@17.3.10
you can try using @angular/material@17.3.8
or just add
npm install --legacy-peer-deps && npm run build in custom build command
18 days ago
npm install --legacy-peer-deps && npm run build in custom build command. Didn't work
On my local, I used npm i ngx-mat-timepicker@17.1.0 --force, and it works. There are newer versions of this library. Maybe if I update to the latest, I might work I'll try that
18 days ago
That could work, make sure you keep all Angular and Angular Material packages on identical versions.