Skip to content

why there is no js file after using "ng build --prod‘’ in my dist? #2759

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

Closed
ElanMu opened this issue Oct 18, 2016 · 7 comments
Closed

why there is no js file after using "ng build --prod‘’ in my dist? #2759

ElanMu opened this issue Oct 18, 2016 · 7 comments

Comments

@ElanMu
Copy link

ElanMu commented Oct 18, 2016

Please provide us with the following information:

OS?

Windows 7

Versions.

angular-cli: 1.0.0-beta.10
node: 6.5.0
os: win32 x64

Repro steps.

ng new testTodo
ng build -- prod

The log given by the failure.

Built project successfully. Stored in "dist/".
File sizes:

  • app.css: 208 B (121 B gzipped)
  • main.css: 38 B (51 B gzipped)
  • main.js: 1.18 MB (249.32 KB gzipped)
  • system-config.js: 2.82 KB (722 B gzipped)
  • es6-shim.js: 131.74 KB (30.4 KB gzipped)
  • Reflect.js: 36.91 KB (5.29 KB gzipped)
  • system.src.js: 159.74 KB (39.05 KB gzipped)
  • zone.js: 55.33 KB (11.98 KB gzipped)

It's builded successfully,but there is no js file in my dis file!

Mention any other details that might be useful.

I add blow in my angular-cli.json file:

"environments": {
"source": "config/environment.ts",
"dev": "config/environment.ts",
"prod": "config/environment.prod.ts"
}

but after " ng build --prod", there is only css and html file and the "app/share/index.ts" is not exist in "dist/app/share"?

@Splaktar
Copy link
Contributor

Splaktar commented Oct 18, 2016

Duplicate of:
#1637
#1452
#1413

You'll want to move to the latest beta.17 w/ webpack and off of the old Broccoli based beta.10 build. Instructions for this migration are here: https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14

@ElanMu
Copy link
Author

ElanMu commented Oct 20, 2016

Thanks for your help!
But there is a new problem ! I follow the "upgrading-from-Beta.10-to-Beta.14" to delete the "system-config.json" file. I need to add the "angular2-cookie" plunk which needs to add angular2-cookie to the map and packages object in the system-config.ts.
My console appear an error "No provider for CookieService!"!

In my app.module.ts file:
"import { CookieService } from './../angular2-cookie/services/cookies.service';"
providers :[
CookieService
]

In my components:
"import {CookieService} from 'angular2-cookie/core';"

So,what should I do? Can you help me? @Splaktar

@filipesilva
Copy link
Contributor

@ElanMu we do not support pre-beta.15 versions anymore unfortunately. Like @Splaktar said, you should upgrade.

Regarding angular2-cookie, I don't know anything about how the library works so I'd advise you to ask at their issue tracker or on Stack Overflow.

@ElanMu
Copy link
Author

ElanMu commented Oct 24, 2016

Ok!
Thanks a lot!

@Splaktar
Copy link
Contributor

@ElanMu you should follow these instructions: https://github.com/salemdar/angular2-cookie#-usage. The angular2-cookie instructions for angular-cli are all out of date and can be ignored. There is an issue to improve those docs here: salemdar/angular2-cookie#22

@ElanMu
Copy link
Author

ElanMu commented Oct 24, 2016

OK, I'll look at it, thank you.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants