platform-server errors with ivy-ngcc - UMD module - Angular 9.0.0-rc.7
See original GitHub issue🐞 bug report
Affected Package
The issue is caused by package @angular/platform-server
Is this a regression?
Yes, the previous version in which this bug was not present was: @angular/platform-server@9.0.0-rc.6
Description
When trying to compile my application with Ivy, I get errors on ivy ngcc for platform-server when compiling for umd bundles (for SSR)
🔬 Minimal Reproduction
Update any project to latest version of Angular (9.0.0-rc.7).
Add following config to angular.json:
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist-server",
"main": "src/main.server.ts",
"tsConfig": "src/tsconfig.server.json"
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "media",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"bundleDependencies": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
}
Then run command:
ng run MyProject:server:production
🔥 Exception or Error
Compiling @angular/platform-server : main as umd
Hash: f0b9625353a4d2f5af81
Time: 12116ms
Built at: 12/23/2019 8:02:36 PM
Asset Size Chunks Chunk Names
main.js 1.75 KiB 0 main
Entrypoint main = main.js
chunk {0} main.js (main) 28 bytes [entry] [rendered]
ERROR in Expected UMD module file (/node_modules/url/node_modules/punycode/punycode.js) to contain exactly one statement, but found [object Object],[object Object].
🌍 Your Environment
Angular Version:
Angular CLI: 9.0.0-rc.7
Node: 12.13.1
OS: win32 x64
Angular: 9.0.0-rc.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker
Ivy Workspace: Yes
Package Version
--------------------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.7
@angular-devkit/build-angular 0.900.0-rc.7
@angular-devkit/build-optimizer 0.900.0-rc.7
@angular-devkit/build-webpack 0.900.0-rc.7
@angular-devkit/core 9.0.0-rc.7
@angular-devkit/schematics 9.0.0-rc.7
@angular/cdk 9.0.0-rc.5
@angular/fire 5.2.1
@angular/google-maps 9.0.0-rc.5
@angular/material 9.0.0-rc.5
@angular/pwa 0.900.0-rc.7
@ngtools/webpack 9.0.0-rc.7
@nguniversal/module-map-ngfactory-loader 9.0.0-next.9
@schematics/angular 9.0.0-rc.7
@schematics/update 0.900.0-rc.7
rxjs 6.5.3
typescript 3.6.4
webpack 4.41.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (21 by maintainers)
Top Results From Across the Web
error: failed to initialize angular compilation - ngcc failed.
\angular-errors.log" for further details. I just updated angular cli, material and core, and other modules needed to my project, then updated npm and...
Read more >Upgrading from AngularJS to Angular
You can take steps to mitigate both bundle size and performance issues. ... @types/angular is declared as a UMD module, and due to...
Read more >angular 13 ng build library fails (ivy partial compilation mode)
I try ng build my-lib and get the below error. ✖ Compiling with Angular sources in Ivy partial compilation mode. Transform failed with ......
Read more >Guide Leading Up to Angular 9.0.0 Release - HUSPI
Changes up to Angular 9.0.0, including bug fixes, breaking changes, deprecations, code refactoring, features, and performance improvements.
Read more >After upgrading to Angular 10, ivy ngcc is compiling as a esm5 ...
After upgrading to Angular 10, ivy ngcc is compiling as a esm5, umd modules. My Environnement: ngular CLI: 10.2.0 Node: 12.15.0 OS: win32 ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Issue not solved with
Angular 9.0.0-rc.9.Yes, the fix is included in v9.0.0-rc.11.