Hi Gunnar
But it is more important for me to get an idea about the risk to invest a lot of time and money using Angular 7 as basis for my next project - and if possible risks can be properly managed or mitigated.
All projects that use build-tools are prone to this kind of issues. This is actually not unique to Angular.
arned now that Angular projects could get into a state where the production build can fail while insufficient information about the reason is provided.
Again, this is not unique to Angular, I have seen this happening to all sorts of projects. Especially when the original creator/maintainer has left. I think the risk with Angular is lower as for an average project.
If I understand you correcly, according to your experience this is not a fatal risk and issues with the compilation for production could so far always be solved with low costs, correct?
Your problem (while not unique) is very rare. And yes. it can be repaired at low costs.
And how would you approach such an issue? Can the compilation process be debugged or traced?
Yes, the compilation process can be debugged and logged. I have done this. However, that is not something I would recommend.
What I would recommend, is start a fresh project, and copy in module for module, until you find the culprit. It is a bit of a drag, but this way you can figure out the cause of your issue quickly.
Also, if it’s a corrupted tool-chain this will fix it in itself.
BTW, you said you did the rm -fr node_modules yarn install cycle. But are you sure you removed your yarn.lock package-lock.json files?
One of the problems I once had in a project was that files in my yarn cache where damaged. so that cycle would pull in a corrupted dep.
Sadly this kind of problem is something a developer has to deal with. I have seen it in all kind of projects.
As soon as there are 3rth party tools and any kind of package manager, this will happen. Not unique to Angular, or even Javascript.
Regards
Sander
Running the app in non-prod mode causes much of the code to be compiled on the fly in the browser at runtime, and, as you have found, misses many issues that will fail a full production compilation. For example, I had an issue yesterday where a component's template referred to a non-existent member variable.
So, you should probably do a production compile after the addition of any major feature, and more often if possible. One way to do that is to use a Continuous Integration (CI) sever, such as Jenkins or Hudson, set up to poll your SCM repo, and build whenever there are changes.
Frequent prod builds will alert you to these issues early, when there are fewer changes, and the problem is easier to find.
Thanks a ton, Sander, for your detailed and quick responses!!
@Injectable({
providedIn: 'root'
})
export class DataService {
url: string;
constructor(uri: string, private http: HttpClient) {
this.url = environment.apiUrl + uri;
}
..activeWarning: Can't resolve all parameters for DataService in Z:/Data/Software_Entwicklung/EmPort/emport-ui/src/app/services/data.service.ts: ([object Object], ?). This will become an error in Angular v6.x
--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/mBM_xy4Vt-s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.