Bug with version 0.0.24 Recent Release
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.
We have to go to production today and this happened on the build server. It has high priority.
Updating rxjs to 5.5.6 fixed this issue for me.
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.
we have the same problem with our production build
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.
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.
@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.
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. :disappointed:
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.
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.
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
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.
I'm experiencing the same issue, I did this for now to generate a new project:
mkdir ng && cd ng
npm i @angular-devkit/[email protected] @angular/cli --no-save
$(npm bin)/ng new my-new-app
@mayrmax What a workaround!! But you save me.
This should be fixed via https://github.com/angular/devkit/pull/345, released as @angular-devkit/[email protected].
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/[email protected] && npm uninstall @angular-devkit/core.
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?
@ubarevicius can you give me the full error log please? I want to see where that missing module is.
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.
It is indeed other file than in original log of this issue
@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 https://github.com/angular/devkit/pull/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.
@filipesilva no problem, thanks for looking into this ;)