Several errors while building app with --prod flag
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
When I try to build my app for production, I get the following errors:
I’m using the 6.3.2 version.
I’m importing it on a shared module, and exporting it to the other modules:
Even if I don’t use it on any component/page, I get the error just from importing it.
Weird things:
- It was working at least until last week (last successful deploy);
- It works on Windows machines, but I get these error in Linux environments;
Searched a lot and got nothing.
Any help?
Thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:33 (1 by maintainers)
Top Results From Across the Web
angular-cli --prod flag errors - Stack Overflow
In the first picture, you are trying to access a variable that is not defined. Could you please go a little bit further...
Read more >Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >Configure build variants | Android Developers
This page shows you how you can configure build variants to create different versions of your app from a single project and how...
Read more >Addressing common errors in React Native - LogRocket Blog
Explore common React Native errors such as "command not found" and learn about their causes and potential solutions.
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got the same issue, Need to add a dependencies library, and the issue will be fixed for me.
"@types/pdfjs-dist": "~2.0.1", "ng2-pdf-viewer": "^6.3.2"
OR else decrease ng2-pdf-viewer version number and add pdfjs-dist
"pdfjs-dist": "~2.5.207", "ng2-pdf-viewer": "~5.3.4",
I got this error today as well.
It looks like the “latest” version of the pdfjs-dist npm went from version 2.5.207 to 2.6.347 a day ago.
Setting pdfjs-dist back to the previous version fixed the errors for me i.e. add this line to your package.json dependencies:
"pdfjs-dist": "2.5.207",