Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

production build not working #11

Closed
theomathieubhvr opened this issue May 9, 2017 · 9 comments
Closed

production build not working #11

theomathieubhvr opened this issue May 9, 2017 · 9 comments
Assignees
Labels

Comments

@theomathieubhvr
Copy link
Contributor

I'm submitting a ... (check one with "x")

[x] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[ ] feature request

Current behavior

After a fresh git clone / npm install, I run npm run build:universal-prod

screen shot 2017-05-09 at 5 37 09 pm
I get this issue 4 times.

screen shot 2017-05-09 at 5 37 26 pm

Then :

screen shot 2017-05-09 at 5 37 35 pm

Expected/desired behavior

Build files ready for universal production server.

Minimal reproduction of the problem with instructions
npm run build:universal-prod

Please tell us about your environment:

Mac OS, yarn.

  • Angular version: 4.1.0
  • Node (for AoT issues): node --version = 6.9.1

Thanks !

PS : it might be that I don't completely understand how to run production. If so, I can create a PR modifying the readme.

@fulls1z3
Copy link
Owner

fulls1z3 commented May 9, 2017

It's a known issue which arises today, this repo depends on the harmony branch of UglifyJs2 and it got somehow broken. If you visit the latest issues on that repo, you'll notice how everyone's builds are failing.

Commenting Uglify plugin from webpack config will help the prod build to be successful. Tomorrow, I'll have a look at the UglifyJs2 repo and try to solve this.

@theomathieubhvr
Copy link
Contributor Author

Cool, thanks !

👍

@fulls1z3 fulls1z3 changed the title Production build (Universal) not working. [bug] production build not working May 10, 2017
@fulls1z3 fulls1z3 self-assigned this May 10, 2017
@fulls1z3 fulls1z3 added the bug label May 10, 2017
@Mahmoud-hassan87
Copy link

i have same issue

@fulls1z3
Copy link
Owner

@Mahmoud-hassan87 i'm still collecting information on this topic, seems like the new of UglifyJS broke many things.

Stay tuned.

@fulls1z3
Copy link
Owner

@theomathieubhvr @Mahmoud-hassan87 get the latest version and try to build. I temporarily commented the UglifyJs and it should run without a problem now.

@theomathieubhvr
Copy link
Contributor Author

Thanks ! That's working now.

I don't know what to do with this issue, renaming it or closing it ?

I'll let you decide.

@fulls1z3
Copy link
Owner

Let's leave it because I could not reproduce it (using fulls1z3/webpack as a dependency). Let's keep this open for a few more days, and let's see.

@fulls1z3
Copy link
Owner

I solved this by forcing the uglify-js deps to use version git://github.com/mishoo/UglifyJS2#harmony-v2.8.22.

Get the latest version of this repository, and remove webpack and uglify-js dirs from node_modules and run npm install/yarn et voila!

fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
build(webpack): update config

Closes #11
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* build(webpack): update config

* docs(readme): update README

Closes (#11)
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* build(webpack): update config

Closes #11
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* build(webpack): update config

* docs(readme): update README

Closes #11
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* build(webpack): update config

Closes #11
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* build(webpack): update config

* docs(readme): update README

Closes #11
@fulls1z3 fulls1z3 changed the title [bug] production build not working production build not working Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants