builder icon indicating copy to clipboard operation
builder copied to clipboard

makeStateKey deprecation causes builder.io not to build in an Angular 18 project

Open jakehockey10 opened this issue 1 year ago • 5 comments

Describe the bug A clear and concise description of what the bug is.

It seems that the makeStateKey function is no longer exported from @angular/platform-browser, but instead is importable from @angular/core in the directive builder-content.directive.ts. If you manually change the import from @angular/platform-browser to @angular/core in your local project's node_modules/@builder.io/angular/fesm2020/builder.io-angular.mjs, the project can build again.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade project to Angular 18
  2. Attempt to build project with ng build

jakehockey10 avatar May 25 '24 07:05 jakehockey10

Thanks for raising this issue.

Worth noting that we are actively working on our Gen2 Angular SDK which will be fully compatible with the latest versions of Angular (17+). It will be launching in beta in the near future.

samijaber avatar May 30 '24 15:05 samijaber

That's awesome! Can you point me to anything public that I can keep tabs on to prevent opening unnecessary issues in the future? I apologize for wasting anyone's time

jakehockey10 avatar May 30 '24 18:05 jakehockey10

@samijaber

Are you going to add an Angular 18 support for Gen1? We are using it in production and just switching to Gen2 beta doesn't seem something safe since it is still beta.

DzmVasileusky avatar Jun 11 '24 15:06 DzmVasileusky

@jakehockey10 One easy way is to watch out for Angular gen2 SDK releases here: https://github.com/BuilderIO/builder/releases?q=sdk-angular&expanded=true

it is currently at 0.0.x, but you will see a clear announcement once it is in Beta (and subsequently in v1).

@DzmVasileusky Correct, Gen2 is still in the early stages and cannot currently replace gen1. We've made a note that some folks still need Gen1 to support angular 18, and will let you know here when there is an update on this.

samijaber avatar Jun 11 '24 18:06 samijaber

@samijaber Thank you, It would be great to have full Gen1 support until Gen2 stable release.

DzmVasileusky avatar Jun 12 '24 07:06 DzmVasileusky

would you be willing to accept a pull request for this? We'd love to be able to unblock our team from upgrading to angular 18, and changing import paths seems like it should be a trivial change

neilsoult avatar Jul 04 '24 09:07 neilsoult

Fixed in v4.0.0 https://github.com/BuilderIO/builder/blob/main/packages/angular/CHANGELOG.md#400

samijaber avatar Aug 06 '24 17:08 samijaber

I have the same issue on @builder.io/angular. I updated using npm and the latest version is 3.0.2. Is there any way to upgrade to version 4?

nidaxnido avatar Aug 14 '24 03:08 nidaxnido

@nidaxnido That was a publishing error on our part. Sorry about that.

You can upgrade by specifically installing npm install @builder.io/[email protected].

samijaber avatar Aug 19 '24 16:08 samijaber

@nidaxnido we just fixed the tags: 4.0.0 is back to being the correct latest https://www.npmjs.com/package/@builder.io/angular?activeTab=versions

Thank you for pointing out the issue.

samijaber avatar Aug 19 '24 16:08 samijaber