-
Notifications
You must be signed in to change notification settings - Fork 26k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zone.js/node breaks for fs.realpath.native and fs.realpathSync.native #45546
Labels
area: zones
Issues related to zone.js
P4
A relatively minor issue that is not relevant to core functions
state: has PR
Milestone
Comments
lamweili
added a commit
to lamweili/angular
that referenced
this issue
Apr 6, 2022
…ative Closes angular#45546 It patches the nested functions of `fs.realpath.native` and `fs.realpathSync.native` first, storing in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
lamweili
added a commit
to lamweili/angular
that referenced
this issue
Apr 6, 2022
Closes angular#45546 It patches the nested functions `fs.realpath.native` and `fs.realpathSync.native` first, storing them in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
14 tasks
lamweili
added a commit
to lamweili/angular
that referenced
this issue
Apr 6, 2022
Closes angular#45546 It patches the nested functions `fs.realpath.native` and `fs.realpathSync.native` first, storing them in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
lamweili
added a commit
to lamweili/angular
that referenced
this issue
Apr 6, 2022
Closes angular#45546 It patches the nested functions `fs.realpath.native` and `fs.realpathSync.native` first, storing them in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
lamweili
added a commit
to lamweili/angular
that referenced
this issue
Apr 6, 2022
Closes angular#45546 It patches the nested functions `fs.realpath.native` and `fs.realpathSync.native` first, storing them in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
lamweili
added a commit
to lamweili/angular
that referenced
this issue
Apr 6, 2022
Closes angular#45546 It patches the nested functions `fs.realpath.native` and `fs.realpathSync.native` first, storing them in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Feb 2, 2024
This commit updates the implementation of the zone.js `fs` patch to restore the implementation of `realpath.native` and patches it as a macrotask, along with other functions of the `fs` package. This is the only nested function that must be patched. Closes: angular#45546
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Feb 2, 2024
This commit updates the implementation of the zone.js `fs` patch to restore the implementation of `realpath.native` and patches it as a macrotask, along with other functions of the `fs` package. This is the only nested function that must be patched. Closes: angular#45546
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: zones
Issues related to zone.js
P4
A relatively minor issue that is not relevant to core functions
state: has PR
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.ts
or the TypeScript would whine (TS4111) and refuse to run.I added the following at the very beginning of the
server.ts
:npm install
followed bynpm run dev:ssr
command.It seems like the
import 'zone.js/node';
did something to thefs
.fs.realpath.native
becomeundefined
from the logs.It does seem like zone.js/node did not factor in
fs
third-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.native
andfs.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
The text was updated successfully, but these errors were encountered: