Shraddha
Shraddha

Reputation: 31

getting error while building in production mode angular5

When I run command ng build --prod.I am getting the error as: could not resolve @angular/flex-layout relative to path_to_node_modules/angular5-time-picker/src/material-time-control.module.d.ts

Upvotes: 0

Views: 53

Answers (1)

G.Nader
G.Nader

Reputation: 857

I've just had the problem it was due to using ^2.0.0-beta.10 and the incorrectly published RC version being seen as the higher/newer version. So make sure you are not using ^ the latest version is 2.0.0-beta.10-4905443 so you should use npm install @angular/[email protected] --save.

To be clear your package.json should not be... "@angular/flex-layout": "^2.0.0-beta.10-4905443", this will actually install version 2.0.0-rc.1, which was meant to be released as 2.0.0-beta.6 so it is actually older than >= 2.0.0-beta.7 <= 2.0.0-beta.10-4905443.

Until that is fixed, you should use fixed versioning... "@angular/flex-layout": "2.0.0-beta.10-4905443",

Upvotes: 1

Related Questions