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
Copy link
Copy link
Closed
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
ubarevicius commentedon Jan 12, 2018
We have to go to production today and this happened on the build server. It has high priority.
Eonfow commentedon Jan 12, 2018
Updating rxjs to 5.5.6 fixed this issue for me.
ubarevicius commentedon Jan 12, 2018
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.
mayrmax commentedon Jan 12, 2018
we have the same problem with our production build
devoto13 commentedon Jan 12, 2018
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.ubarevicius commentedon Jan 12, 2018
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.
devoto13 commentedon Jan 12, 2018
@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.
mfaurel commentedon Jan 12, 2018
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. 😞
ubarevicius commentedon Jan 12, 2018
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.
devoto13 commentedon Jan 12, 2018
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.
mayrmax commentedon Jan 12, 2018
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 weekendubarevicius commentedon Jan 12, 2018
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.
elclanrs commentedon Jan 12, 2018
I'm experiencing the same issue, I did this for now to generate a new project:
cdCarlos commentedon Jan 13, 2018
@mayrmax What a workaround!! But you save me.
filipesilva commentedon Jan 15, 2018
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.ubarevicius commentedon Jan 15, 2018
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?
filipesilva commentedon Jan 15, 2018
@ubarevicius can you give me the full error log please? I want to see where that missing module is.
ubarevicius commentedon Jan 15, 2018
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
filipesilva commentedon Jan 15, 2018
@ubarevicius Thanks for getting so quickly. I can confirm that
@angular-devkit/coredid 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
dependenciesandpeerDependenciesin@schematics/*packages, so it might be better to review all.ubarevicius commentedon Jan 15, 2018
@filipesilva no problem, thanks for looking into this ;)
Davilink commentedon Jan 18, 2018
I had to add
@angular-devkit/schematics@0.0.48in 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.bFraley commentedon Jan 18, 2018
@Davilink thanks for your comment. That was the last piece of the puzzle I needed to get get my build back in shape.
filipesilva commentedon Jan 25, 2018
I think this is sorted now. Please see angular/angular-cli#9283 (comment) for a list of the updated versions with the fix.
ubarevicius commentedon Jan 25, 2018
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!