Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Bug with version 0.0.24 Recent Release #380

Closed
MarkPerryBV opened this issue Jan 12, 2018 · 25 comments
Closed

Bug with version 0.0.24 Recent Release #380

MarkPerryBV opened this issue Jan 12, 2018 · 25 comments

Comments

@MarkPerryBV
Copy link

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.

@ubarevicius
Copy link

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

@Eonfow
Copy link

Eonfow commented Jan 12, 2018

Updating rxjs to 5.5.6 fixed this issue for me.

@ubarevicius
Copy link

ubarevicius commented 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
Copy link

mayrmax commented Jan 12, 2018

we have the same problem with our production build

@devoto13
Copy link
Contributor

devoto13 commented 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
Copy link

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
Copy link
Contributor

devoto13 commented 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
Copy link

mfaurel commented 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
Copy link

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
Copy link
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.

@mayrmax
Copy link

mayrmax commented 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 weekend

@ubarevicius
Copy link

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
Copy link

elclanrs commented Jan 12, 2018

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

@cdCarlos
Copy link

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

@filipesilva
Copy link
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.

@ubarevicius
Copy link

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
Copy link
Contributor

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

@ubarevicius
Copy link

ubarevicius commented 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
Copy link
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.

@filipesilva filipesilva reopened this Jan 15, 2018
@ubarevicius
Copy link

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

@Davilink
Copy link

Davilink commented Jan 18, 2018

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.

@bFraley
Copy link

bFraley commented 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.

@ghost
Copy link

ghost commented Jan 20, 2018

Just created a fresh project and tried ng serve.

module.js:557
    throw err;
    ^

Error: Cannot find module '@angular-devkit/core'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (E:\Projects\...\node_modules\@angular-devkit\schematics\src\tree\virtual.js:10:16)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)

@filipesilva
Copy link
Contributor

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

@ubarevicius
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests