3035app / pialab

PiaLab Angular app
http://www.pialab.io/
GNU General Public License v3.0
26 stars 8 forks source link

Error in build for production #38

Closed daniel84 closed 6 years ago

daniel84 commented 6 years ago

Summary

When trying to build pialab for distribution with "ng build --prod" command, I get the following error on console: ERROR in Cannot read property 'length' of undefined Informations about my configuration follow: image

Steps to reproduce

Just try to build the pialab angular application for production with the "ng build --prod" command.

Expected behavior

Complete compilation for production environment in dist folder

Actual behavior

"ERROR in Cannot read property 'length' of undefined" in console.

PapsOu commented 6 years ago

Hello @daniel84,

It is possible that this error occurs because the file src/environments/environment.prod.ts is missing.

So please copy the file src/environments/environment.dev.ts.example to src/environments/environment.prod.ts and fill it according to your server configuration.

note: @RomainSanchez the file src/environments/environment.prod.ts.example is not up to date so don't use it.

Hope this helps.