Skip to content

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

Closed

Description

@tomhackettishida
  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.

Activity

  1. alexsorokoletov commented on Sep 28, 2016

    @alexsorokoletov

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

  2. tomwanzek commented on Sep 28, 2016

    @tomwanzek

    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.

  3. filipesilva commented on Oct 6, 2016

    @filipesilva
    Contributor

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

  4. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  5. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions