`fs.realpath.native` is `undefined`
`fs.realpathSync.native` is `undefined`
Angular CLI: 13.3.1
Node: 14.19.1
Package Manager: npm 6.14.16
OS: win32 x64
Angular: 13.3.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.1 (cli-only)
@angular-devkit/build-angular 13.3.1
@angular-devkit/core 13.3.1 (cli-only)
@angular-devkit/schematics 13.3.1 (cli-only)
@nguniversal/builders 13.1.0
@nguniversal/express-engine 13.1.0
@schematics/angular 13.3.1 (cli-only)
rxjs 7.4.0
typescript 4.5.5
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
Using the ready-made https://angular.io/generated/zips/universal/universal.zip from https://angular.io/guide/universal.
Edited
server.tsor the TypeScript would whine (TS4111) and refuse to run.I added the following at the very beginning of the
server.ts:npm installfollowed bynpm run dev:ssrcommand.It seems like the
import 'zone.js/node';did something to thefs.fs.realpath.nativebecomeundefinedfrom the logs.It does seem like zone.js/node did not factor in
fsthird-level functions. From the fs API documentation, most are second-level functions (i.e.fs.xxx). But there are 2 exceptions since NodeJS 9.2.0 that are in third-level (i.e.fs.xxx.yyy), which arefs.realpath.nativeandfs.realpathSync.native. So when the package did some wrapping around, the third-level functions broke.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version)Anything else?
Fixed by PR #45552