Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Bug with version 0.0.24 Recent Release #380

Closed

Description

@MarkPerryBV

Build server using @angular-cli is now producing errors when pulling in the new version of the devkit.

[08:42:38][npm run build:teamcity] Error: Cannot find module 'rxjs/operators/map'
[08:42:38][npm run build:teamcity]     at Function.Module._resolveFilename (module.js:469:15)
[08:42:38][npm run build:teamcity]     at Function.Module._load (module.js:417:25)
[08:42:38][npm run build:teamcity]     at Module.require (module.js:497:17)
[08:42:38][npm run build:teamcity]     at require (internal/module.js:20:19)
[08:42:38][npm run build:teamcity]     at Object.<anonymous> (E:\TeamCityBuildAgent2\work\4f3d8920f08a3388\src\ClaimsControl.Api\node_modules\@angular-devkit\core\src\json\schema\registry.js:15:15)
[08:42:38][npm run build:teamcity]     at Module._compile (module.js:570:32)
[08:42:38][npm run build:teamcity]     at Object.Module._extensions..js (module.js:579:10)
[08:42:38][npm run build:teamcity]     at Module.load (module.js:487:32)
[08:42:38][npm run build:teamcity]     at tryModuleLoad (module.js:446:12)
[08:42:38][npm run build:teamcity]     at Function.Module._load (module.js:438:3)

This will cause all @angular-cli builds to fail.

Activity

  1. ubarevicius commented on Jan 12, 2018

    @ubarevicius

    We have to go to production today and this happened on the build server. It has high priority.

  2. Eonfow commented on Jan 12, 2018

    @Eonfow

    Updating rxjs to 5.5.6 fixed this issue for me.

  3. ubarevicius commented on Jan 12, 2018

    @ubarevicius

    Our websites were not tested with 5.5 version of rxjs and I doubt that lettable operators would work for us. Also with such a breaking change we would have to go through dev/acc/prod servers. This does not make any sense. I will be looking for alternatives. But I would really appreciate if this change would be rolled back on devkit project.

  4. mayrmax commented on Jan 12, 2018

    @mayrmax

    we have the same problem with our production build

  5. devoto13 commented on Jan 12, 2018

    @devoto13
    Contributor

    I totally understand that this is a high priority for you, guys. But have you thought about locking your dependencies, so your production builds won't crash every time random library publishes release with breaking changes?

    You can do it with Yarn or NPM 5 + package-lock.json.

  6. ubarevicius commented on Jan 12, 2018

    @ubarevicius

    Our build servers use node 6 with npm 3, we have limited rights on the build server as it is used for many other projects, so package-lock.json or global yarn installlations are not possible.

  7. devoto13 commented on Jan 12, 2018

    @devoto13
    Contributor

    @ubarevicius NPM 3 has shrinkwrap. It's much less convenient to use though.

    But I would seriously consider contacting system administrator and raising this concern. It is also not hard to run every build in its own Docker container to allow every project use whatever version of NPM/Yarn they need without conflicting with each other.

    PS There were interesting presentation from Igor Minar with good practices for CI configuration.

  8. mfaurel commented on Jan 12, 2018

    @mfaurel

    Hey guys.
    We also have like 18 projects that are broken because of this and some are going to production today.
    @devoto13 We are changing little by little our CI, we don't have Docker yet because it's not supported there...
    A breaking change like that is kinda messy. 😞

  9. ubarevicius commented on Jan 12, 2018

    @ubarevicius

    I am aware of these technologies and solutions to prevent this from happening, but I do not run administrator teams of my client and this will not be resolved today. We will have to push locally built version to git and get around the build server to create deliverable. Local packages are locked and it is thus possible, but to us it is an emergency situation. By the way, I do not want to start some discussion war here that is not relevant. What would help is to know if devkit team can solve this. Otherwise we will go further with our solution.

  10. devoto13 commented on Jan 12, 2018

    @devoto13
    Contributor

    I just keep seeing people coming to issues and complaining that their production build is broken with new release and library authors should fix it ASAP. IMO this is fundamentally wrong and I'm trying to make sure people are aware of that and take actions to fix it on their side.

    @ubarevicius Sure. You have your limitation and I understand that. I'll refrain from further comments and let's see what maintainers have to say.

  11. mayrmax commented on Jan 12, 2018

    @mayrmax

    adding
    "@angular-devkit/schematics":"0.0.42", "@angular-devkit/core": "0.0.23", to the package.json fixes the problems if you need a quick fix before the weekend

  12. ubarevicius commented on Jan 12, 2018

    @ubarevicius

    Thanks, I'll check this solution, we kind of solved this problem. @devoto13 I'm sorry if I sounded as if I demand solution asap. I was under stress. The cli helps us a lot in development and we appreciate the work of the team. We will advise the administrator teams to make improvements for the build servers.

  13. elclanrs commented on Jan 12, 2018

    @elclanrs

    I'm experiencing the same issue, I did this for now to generate a new project:

    mkdir ng && cd ng
    npm i @angular-devkit/schematics@0.0.45 @angular/cli --no-save
    $(npm bin)/ng new my-new-app
  14. cdCarlos commented on Jan 13, 2018

    @cdCarlos

    @mayrmax What a workaround!! But you save me.

  15. filipesilva commented on Jan 15, 2018

    @filipesilva
    Contributor

    This should be fixed via #345, released as @angular-devkit/core@0.0.25.

    Your dependency might not update automatically though. You can force it to update by installing and uninstalling the right version at toplevel: npm install @angular-devkit/core@0.0.25 && npm uninstall @angular-devkit/core.

  16. ubarevicius commented on Jan 15, 2018

    @ubarevicius

    I've installed 0.0.25 and with rxjs 5.4 I get this error:

    Error: Cannot find module 'rxjs/operators'

    I suppose that the fix still implies that rxjs on all angular 4 projects using angular cli should be updated to v5.5 or higher. Is that correct?

  17. filipesilva commented on Jan 15, 2018

    @filipesilva
    Contributor

    @ubarevicius can you give me the full error log please? I want to see where that missing module is.

  18. ubarevicius commented on Jan 15, 2018

    @ubarevicius

    Error: Cannot find module 'rxjs/operators'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object. (E:\MyProject\node_modules@angular-devkit\core\src\logger\indent.js:10:21)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

    It is indeed other file than in original log of this issue

  19. filipesilva commented on Jan 15, 2018

    @filipesilva
    Contributor

    @ubarevicius Thanks for getting so quickly. I can confirm that @angular-devkit/core did not received the correct dependency in rxjs (https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/package.json#L13) as part of #345.

    @Brocco can you take a look again please? I also saw some odd mixes of rxjs dependencies and peerDependencies in @schematics/* packages, so it might be better to review all.

  20. ubarevicius commented on Jan 15, 2018

    @ubarevicius

    @filipesilva no problem, thanks for looking into this ;)

  21. Davilink commented on Jan 18, 2018

    @Davilink

    I had to add @angular-devkit/schematics@0.0.48 in my package.json, because the 0.0.46 didn't correct the ng generate, but now i have a warning when i « npm install ». The CLI still work, but it's just annoying to get the warning.

    npm WARN @schematics/schematics@0.0.13 requires a peer of @angular-devkit/schematics@0.0.46 but none is installed. You must install peer dependencies yourself.
    npm WARN @schematics/angular@0.1.13 requires a peer of @angular-devkit/schematics@0.0.46 but none is installed. You must install peer dependencies yourself.
    
  22. bFraley commented on Jan 18, 2018

    @bFraley

    @Davilink thanks for your comment. That was the last piece of the puzzle I needed to get get my build back in shape.

  23. filipesilva commented on Jan 25, 2018

    @filipesilva
    Contributor

    I think this is sorted now. Please see angular/angular-cli#9283 (comment) for a list of the updated versions with the fix.

  24. ubarevicius commented on Jan 25, 2018

    @ubarevicius

    Thanks Filipe. We've just migrated to Angular 5.2.1 with new Rxjs and Angular CLI. Thus I can't confirm if it still works for older versions, but for us everything is working fine now. Cheers!

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