Skip to content

Third party lib works unless I use --prod #2393

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
tomhackettishida opened this issue Sep 28, 2016 · 4 comments
Closed

Third party lib works unless I use --prod #2393

tomhackettishida opened this issue Sep 28, 2016 · 4 comments

Comments

@tomhackettishida
Copy link

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Windows 10
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.11-webpack.2
    node: 4.4.7
  3. The log given by the failure. Normally this include a stack trace and some
    more information.
    Error: Uncaught (in promise): No value accessor for form control with name: 'startDate'
  4. Mention any other details that might be useful.
    I'm using a third party lib (ng2-datepicker) which works when I use ng-serve, and also works when i use ng build. But as soon as I build with --prod it stops working and I get this error. Pulling my hair out trying to solve the issue, any ideas?

Thanks.

@alexsorokoletov
Copy link

@tomhackettishida we use ng2-typeahead, works just fine with prod

@tomwanzek
Copy link

I had a similar experience, possibly with the same root cause?

I published a service to inject D3 as a service (d3-ng2-service) into Angular 2, while its written in TS to published package built exports two version of the transpiled JS (ES5 target/ES 6 module) and (ES6 target/ES6 module).

When importing the service into an angular-cli (beta 15) project, there is no issue, including with the --prod flag.

I locally experimented with using Rollup to provide a UMD bundle as on of the builts, for other module loaders.

The experience I had was essentially the same, when linking the 'experimental' local package version. While the error message differed in detail, it only created a runtime error with --prod, no problem occurred in dev mode.

@filipesilva
Copy link
Contributor

This was a bug we had in webpack.2 but was fixed for webpack.3: #1662

@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

4 participants