-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng build #3496
Comments
Please reproduce #3495 to see if your issue is a duplicate of it or not. |
OS? Versions. -- if (isDevMode()) { |
My bad, I wanted to say "check", not reproduce ... if you didn't use isDevMode and didn't change anything about environment.prod.ts, this is not a duplicate. But we still need some infos ... Please follow the Submission Guidelines |
OS? Versions. Repro steps. |
in the prod environment i see "loading", and error in the console SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function |
I don't think this is an issue with angular-cli. See http://stackoverflow.com/questions/24573061/uncaught-syntaxerror-in-strict-mode-code-functions-can-only-be-declared-at-top and check your code. If you still don't find anything, give use the lines of code around the error. |
Dupe of angular/angular#13301 |
I know this is after the fact, but I got it to work by putting the contents of the dist folder (excepting the index.html) into the root folder of the production site...it seems that's where angular is looking for them. Is there a way to build so that the bundles do not have to be placed directly in the root? This could get quick messy if running multiple angular apps on the same site. UPDATE: I was able to get this to work by using the --base-href /MyUrl/ during the ng build (documented in README) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I installed a clean angular cli "hello world" project, local host works fine, but when i build it doesn't work in production.
Can you explain if i need to change anything out of the box to just get a working prod version that is able run (the prod server is not running nodejs..but i dont need it right?).
i tried ng build and copied the filed over to the server manually as i dont have environments setup.
The text was updated successfully, but these errors were encountered: