ng generate universal issue with run command

I am using new @angular/cli 18.2.5.
I did:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>ng new my-app
</code>
<code>ng new my-app </code>
ng new my-app

Next:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>ng add @nguniversal/express-engine
</code>
<code>ng add @nguniversal/express-engine </code>
ng add @nguniversal/express-engine

I got error “NOT SUPPORTED: keyword “id”, use “$id” for schema ID”) but the installation was successful.

And now I am trying:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>1. ng generate universal --client-project=my-app
</code>
<code>1. ng generate universal --client-project=my-app </code>
1. ng generate universal --client-project=my-app

Error: Unknown argument: client-project

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>2. ng generate universal
</code>
<code>2. ng generate universal </code>
2. ng generate universal

Error: A collection and schematic is required during execution.

I follow this documentation: https://angulardive.com/blog/implementing-angular-universal-in-your-existing-angular-application/

I tested a lot of things, but can’t find any solution for this. I am not sure if issue is releated to angular version (tried also angular 17), this error “NOT SUPPORTED: keyword “id”, use “$id” for schema ID” or something else.

It seems like you’re hitting a compatibility issue between @nguniversal/express-engine and Angular 18. Right now, nguniversal is expecting Angular v16 as a peer dependency. Downgrading to Angular 16 should solve the issue!

When I tried to upgrade nguniversal, I got the following response :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>my-app>ng update @nguniversal/express-engine
Using package manager: npm
Collecting installed dependencies...
Found 28 dependencies.
Fetching dependency metadata from registry...
Package "@nguniversal/express-engine" has an incompatible peer dependency to "@angular/common" (requires "^16.0.0 || ^16.1.0-next.0", would install "18.2.5")
Package "@nguniversal/express-engine" has an incompatible peer dependency to "@angular/core" (requires "^16.0.0 || ^16.1.0-next.0", would install "18.2.5")
× Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
</code>
<code>my-app>ng update @nguniversal/express-engine Using package manager: npm Collecting installed dependencies... Found 28 dependencies. Fetching dependency metadata from registry... Package "@nguniversal/express-engine" has an incompatible peer dependency to "@angular/common" (requires "^16.0.0 || ^16.1.0-next.0", would install "18.2.5") Package "@nguniversal/express-engine" has an incompatible peer dependency to "@angular/core" (requires "^16.0.0 || ^16.1.0-next.0", would install "18.2.5") × Migration failed: Incompatible peer dependencies found. Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together. </code>
my-app>ng update @nguniversal/express-engine
Using package manager: npm
Collecting installed dependencies...
Found 28 dependencies.
Fetching dependency metadata from registry...
                  Package "@nguniversal/express-engine" has an incompatible peer dependency to "@angular/common" (requires "^16.0.0 || ^16.1.0-next.0", would install "18.2.5")
                  Package "@nguniversal/express-engine" has an incompatible peer dependency to "@angular/core" (requires "^16.0.0 || ^16.1.0-next.0", would install "18.2.5")
× Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.

Also, I got the following response after downgrading the CLI’s version to 16 :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>my-app>ng add @nguniversal/express-engine
i Using package manager: npm
√ Found compatible package version: @nguniversal/[email protected].
√ Package information loaded.
The package @nguniversal/[email protected] will be installed and
executed.
Would you like to proceed? Yes
√ Packages successfully installed.
</code>
<code>my-app>ng add @nguniversal/express-engine i Using package manager: npm √ Found compatible package version: @nguniversal/[email protected]. √ Package information loaded. The package @nguniversal/[email protected] will be installed and executed. Would you like to proceed? Yes √ Packages successfully installed. </code>
my-app>ng add @nguniversal/express-engine
i Using package manager: npm
√ Found compatible package version: @nguniversal/[email protected].
√ Package information loaded.

The package @nguniversal/[email protected] will be installed and
executed.
Would you like to proceed? Yes
√ Packages successfully installed.

New contributor

dxxhsi97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật