-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Parcel Bundler Error - fs.findAncestorFile #16460
Comments
I got as far as |
I've opened an issue in |
awesome thank you so much |
This function seems to be defined in Parcel (probably this one: https://github.com/parcel-bundler/parcel/blob/27bf5963322ba124b4878a0e4cfd6d60979b0d02/packages/core/fs/src/find.js#L35) and not in Node. I did a text search in the Node codebase and Node docs and couldn't find any results for I haven't investigated why it's not on the Edit: There's a native implementation for the function with |
这里的 searchNative 即 @parcel/fs-search 只有
也许是在 deno 环境下加载 node 插件异常 |
awesome thank you for the feedback attemped to implement a custom can someone guide me to what this is, or is there a way for me to inplement this manually @bartlomieju how can I start contributing to Deno |
Are you using parcel-bundler, which is deprecated? |
oh no I am using |
@lilnasy does the |
I ran the canary build and sadly, it does not work. It does not panic anymore, but now I get the same error as you: On a different note, it's interesting that it says that specifically, not that it's undefined. |
I added console.log's to deno's cached files and turns out I couldn't find anything more because deno wouldn't wait for me attach a debugger before it throws this error. @rawkakani are you able to attach a debugger with the |
The issue seems to be with the experimental Node API support. |
@littledivy please take a look |
@lilnasy I extended the deno fs like this
and changed the FS that parcel core uses
and got the error above I mentioned I will attempt to attach the debugger |
@rawkakani That specific error has to do with Node's V8 API. V8 is what Node and Deno use under the hood to run javascript, and for now Deno does not have a compatibility layer to directly interact with it. The fact that you are directly able to import |
I think I found a clue. Was logging all exports when a native addon is loaded and noticed that
Screenshot of the exports: Logging out the v8 pointer confirms that both |
Nice investigation @marvinhagemeister. Can you share the code where you dump the pointers? |
@bartlomieju Upon second look I think I got the pointer bit wrong. Printed out the Either way, as far as I can tell the modules which run into the bug described here go through the Lines 628 to 656 in 935071d
Made an isolated reproduction case. Steps to reproduce
|
Thanks @marvinhagemeister! I just spotted the error here, will fix it at first convenience. |
This commit fixes problem with loading N-API modules that use the "old" way of registration (using "napi_module_register" API). The slot was not cleared after loading modules, causing subsequent calls that use the new way of registration (using "napi_register_module_v1" API) to try and load the previous module. Ref #16460 --------- Co-authored-by: Divy Srivastava <[email protected]>
are these changes available in 1.34? |
@rawkakani, no, they will be available in v1.34.1 to be release later this week. |
@bartlomieju thank you |
I have upgraded to 1.34.1, and have gotten the below error trying to implement Parcel API
this occurs when I use the below script and install @parcel/config-default locally using npm
if anyone does get this right can you please let me know however the fs.findAncestorFile error is gone thank you @bartlomieju |
I believe the error you are seeing is the same problem as #18334 is trying to fix. |
okay awesome thank you, is it cool to close this issue and watch the PR you mentioned |
Hi
I am currently running into an issue where I am following the Parcel API documentation, and currently running into a Type error as below
error: Uncaught TypeError: fs.findAncestorFile is not a function
Currently using Deno 1.27.0, I would like to find out if there is another way to use parcel with Deno ?
I am importing @parcel/core and not parcel
System
Apple M1
macOS Ventura
The text was updated successfully, but these errors were encountered: