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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.0.0-rc.8 build failed #34720

Closed
sysmat opened this issue Jan 10, 2020 · 18 comments
Closed

9.0.0-rc.8 build failed #34720

sysmat opened this issue Jan 10, 2020 · 18 comments
Labels
needs reproduction This issue needs a reproduction in order for the team to investigate further type: bug/fix
Milestone

Comments

@sysmat
Copy link

sysmat commented Jan 10, 2020

馃悶 bug report

Affected Package

@angular/compiler": "9.0.0-rc.8

Is this a regression?

Yes, the previous version(9.0.0-rc.7) in which this bug was not present was: ....

Description

Not building anymore

馃敩 Minimal Reproduction

Issues that don't have enough info and can't be reproduced will be closed.

You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
-->

馃敟 Exception or Error


WARNING in Entry point 'ng-ace-editor' contains deep imports into 'node_modules/brace/theme/monokai'. This is probably not a problem, but may cause the compilation of entry points to be out of order.

ERROR in The target entry-point "ng-ace-editor" has missing dependencies:
 - brace/theme/monokai

馃實 Your Environment

Angular Version:


@angular-devkit/architect         0.900.0-rc.8
@angular-devkit/build-angular     0.900.0-rc.8
@angular-devkit/build-optimizer   0.900.0-rc.8
@angular-devkit/build-webpack     0.900.0-rc.8
@angular-devkit/core              9.0.0-rc.8
@angular-devkit/schematics        9.0.0-rc.8
@ngtools/webpack                  9.0.0-rc.8
@schematics/angular               9.0.0-rc.8
@schematics/update                0.900.0-rc.8
rxjs                              6.5.4
typescript                        3.6.4
webpack                           4.41.2

Anything else relevant?

@sysmat sysmat changed the title 9.0.0-rc.8 build faile 9.0.0-rc.8 build failed Jan 10, 2020
@gkalpak
Copy link
Member

gkalpak commented Jan 10, 2020

Could you please check whether the error happens with the build artifacts from here (to see if #34695 will fix the issue)? If the error still happens, could you create a minimal reproduction?

@gkalpak gkalpak added comp: ngcc needs reproduction This issue needs a reproduction in order for the team to investigate further labels Jan 10, 2020
@ngbot ngbot bot added this to the needsTriage milestone Jan 10, 2020
@benelliott
Copy link
Contributor

@gkalpak Not the OP but I still encounter this error when I use the artifacts you mentioned.

For me, the issue is as follows:

  • App A imports internal library B
  • B bundles up the libraries cleave.js and @types/cleave.js as private dependencies (whitelisted in the NgPackagr config)
  • a module in B transitively exposes an import of cleave.js/options, which is an entrypoint that is only provided by @types/cleave.js and not by the "real" cleave.js

This results in the following error when trying to compile App A with Ivy:

The target entry-point "[library-B]/[secondary-entrypoint]" has missing dependencies:
 - cleave.js/options

I will try to provide a reproduction soon if I have time.

@petebacondarwin
Copy link
Member

@benelliott - did you manage to get round to creating a reproduction of this issue?

@petebacondarwin
Copy link
Member

I looked into this... the cause of the problem is that the DtsDependencyHost does not find paths that are in the @types folder as "deep" imports. This can be resolved by enhancing the ModuleResolver to be able to accept "prefixes" (on top of the "postfixes" that it can already accept). The DtsDependencyHost could then provide @types as a potential prefix to consider when looking for deep imports.

I'll update my PR tomorrow.

@sanjeevprasad
Copy link

sanjeevprasad commented Jan 14, 2020

I can confirm this bug... i am getting the same error..
i also tried installing brace using yarn add brace but no luck.
issue still exist.
is there any workaround for now?

update:
seems like need to downgrade for now.

@benelliott
Copy link
Contributor

@petebacondarwin I hadn't yet, would that still be useful to you?

@petebacondarwin
Copy link
Member

Don't worry @benelliott - I managed to reproduce your problem locally.
@sanjeevprasad - did you try using the artifacts from my PR? See https://app.circleci.com/jobs/github/angular/angular/579375/artifacts

petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Jan 14, 2020
When searching the typings program for a package for imports a
distinction is drawn between missing entry-points and deep imports.

Previously in the `DtsDependencyHost` these deep imports may be
marked as missing if there was no typings file at the deep import path.
Instead there may be a javascript file instead. In practice this means
the import is "deep" and not "missing".

Now the `DtsDependencyHost` will also consider `.js` files when checking
for deep-imports, and it will also look inside `@types/...` for a suitable
deep-imported typings file.

Fixes angular#34720
petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Jan 14, 2020
When searching the typings program for a package for imports a
distinction is drawn between missing entry-points and deep imports.

Previously in the `DtsDependencyHost` these deep imports may be
marked as missing if there was no typings file at the deep import path.
Instead there may be a javascript file instead. In practice this means
the import is "deep" and not "missing".

Now the `DtsDependencyHost` will also consider `.js` files when checking
for deep-imports, and it will also look inside `@types/...` for a suitable
deep-imported typings file.

Fixes angular#34720
@petebacondarwin
Copy link
Member

@benelliott - I have updated my PR to fix this issue.

@benelliott
Copy link
Contributor

@petebacondarwin Thanks, is there an easy way for me to download the shippable artifacts and give it a spin?

@petebacondarwin
Copy link
Member

@benelliott
Copy link
Contributor

Sorry - both of your links give me a 404

@gkalpak
Copy link
Member

gkalpak commented Jan 14, 2020

Try https://circleci.com/gh/angular/angular/585697#artifacts/containers/0.
(Pete has different URLs, because he has opted into the new CircleCI UI, so if you haven't opted in, you get 404s 馃槥)

@petebacondarwin
Copy link
Member

Sorry both :-)

petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Jan 15, 2020
When searching the typings program for a package for imports a
distinction is drawn between missing entry-points and deep imports.

Previously in the `DtsDependencyHost` these deep imports may be
marked as missing if there was no typings file at the deep import path.
Instead there may be a javascript file instead. In practice this means
the import is "deep" and not "missing".

Now the `DtsDependencyHost` will also consider `.js` files when checking
for deep-imports, and it will also look inside `@types/...` for a suitable
deep-imported typings file.

Fixes angular#34720
atscott pushed a commit that referenced this issue Jan 15, 2020
When searching the typings program for a package for imports a
distinction is drawn between missing entry-points and deep imports.

Previously in the `DtsDependencyHost` these deep imports may be
marked as missing if there was no typings file at the deep import path.
Instead there may be a javascript file instead. In practice this means
the import is "deep" and not "missing".

Now the `DtsDependencyHost` will also consider `.js` files when checking
for deep-imports, and it will also look inside `@types/...` for a suitable
deep-imported typings file.

Fixes #34720

PR Close #34695
@benelliott
Copy link
Contributor

Thanks @petebacondarwin, I just tried your artifacts and can confirm they fixed my build issues.

@luthor77
Copy link

I'm getting the same error as the creator of the issue, since rc.8, first with mobiscroll. So I created this issue: acidb/mobiscroll#475
Now that the issue is resolved I'm getting with @fullcalendar.

So I don't know if I should create an issue @fullcalendar too, and all other librarys that eventually can get the same error, or here.

ERROR in The target entry-point "@fullcalendar/angular" has missing dependencies:

  • @fullcalendar/core/types/input-types
  • @fullcalendar/core/datelib/env
  • @fullcalendar/core/datelib/duration
  • @fullcalendar/core/datelib/formatting
  • @fullcalendar/core/datelib/date-range
  • @fullcalendar/core/datelib/locale
  • @fullcalendar/core/validation
  • @fullcalendar/core/structs/event-source

With me, this error only occurs if Ivy is enabled, or, always with ng test.

@petebacondarwin
Copy link
Member

@luthor77 - would you be able to create a minimal repository that reproduces this error and share it in a new issue here?

@luthor77
Copy link

@petebacondarwin #35054

@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 Mar 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction This issue needs a reproduction in order for the team to investigate further type: bug/fix
Projects
None yet
Development

No branches or pull requests

6 participants