x)No.
Cannot upgrade to 9.0.0.rc.3 due circular requirements.
When I run ng update I get an error:
Error: The ngcc compiler has changed since the last ngcc build.
Please remove "/home/harry/Projects/.../users-app/node_modules" and try again.
Now I delete node_modules and try again, I get the following error:
Package '@angular/cli' is not a dependency.
If I run npm i and run ng update again, I get the same error again:
Error: The ngcc compiler has changed since the last ngcc build.
Please remove "/home/harry/Projects/.../users-app/node_modules" and try again.
I haven't found a way for workaround for this circular requirements.
I tried many different variations, but none worked. This is one example:
rm -rf node_modules
npm i
ng update --force @angular/cli@next @angular/core@next
UPDATE package.json (2010 bytes)
⠧ Installing packages...
> @angular/[email protected] postinstall /home/harry/Projects/.../users-app/node_modules/@angular/cli
> node ./bin/postinstall/script.js
> [email protected] postinstall /home/harry/Projects/.../users-app
> ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points
Error: The ngcc compiler has changed since the last ngcc build.
Please remove "/home/harry/Projects/.../users-app/node_modules" and try again.
at Object.hasBeenProcessed (/home/harry/Projects/.../users-app/node_modules/@angular/compiler-cli/ngcc/src/packages/build_marker.js:44:19)
at analyzeEntryPoints (/home/harry/Projects/.../users-app/node_modules/@angular/compiler-cli/ngcc/src/main.js:86:62)
at new ClusterMaster (/home/harry/Projects/.../users-app/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:40:30)
at ClusterExecutor.<anonymous> (/home/harry/Projects/.../users-app/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/executor.js:40:34)
at step (/home/harry/Projects/.../users-app/node_modules/tslib/tslib.js:136:27)
at Object.next (/home/harry/Projects/.../users-app/node_modules/tslib/tslib.js:117:57)
at /home/harry/Projects/.../users-app/node_modules/tslib/tslib.js:110:75
at new Promise (<anonymous>)
at Object.__awaiter (/home/harry/Projects/.../users-app/node_modules/tslib/tslib.js:106:16)
at ClusterExecutor.execute (/home/harry/Projects/.../users-app/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/executor.js:35:28)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.0-rc.2
Node: 10.17.0
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.2
@angular-devkit/core 9.0.0-rc.2
@angular-devkit/schematics 9.0.0-rc.2
@schematics/angular 9.0.0-rc.2
@schematics/update 0.900.0-rc.2
rxjs 6.5.3
Anything else relevant?
I think ngcc should automatically overwrite dynamically generated content (presumably created by an earlier version of ngcc itself) during upgrade instead of failing out and asking the user to come up with a workaround.
Hi, can you try to remove the postinsall script for ngcc in your package.json?
Maybe the postinstall script could be removed during the update? Had the same issue, really confusing problem.
yes, removing postinstall allowed me to install 9.0.0-rc3. thanks.
We've opted to not use this postinstall anymore. We added it in the early next/rc versions of Angular 9, but now removed it. Apologies for the churn, you can just remove it now.
I realize this has been closed, but I hesitate to open a new bug until I research more. I'm seeing this same error with rc.7, but rc.6 works fine. Anyone else seeing this issue re-surface in the newest RC?
ERROR in The ngcc compiler has changed since the last ngcc build.
Please remove "/Users/.../node_modules" and try again.
@arobinson upgrading from rc.4 to rc.7 gave me the same error
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._
Most helpful comment
Hi, can you try to remove the postinsall script for ngcc in your package.json?