Open YannHulot opened 1 month ago
Hmm... Ok. I don't know much about React Native (been a while since I worked with it).
My understanding of what you would need to do (might be wrong in a few ways):
Hmm... Ok. I don't know much about React Native (been a while since I worked with it).
My understanding of what you would need to do (might be wrong in a few ways):
* Use something like https://blog.logrocket.com/how-to-access-file-systems-react-native/ to make general file system operations working. * Use a require alias to map the zenfs dependency to one of the react native compatible interfaces. Since zenfs is the same interface as node fs, any node fs compatible React Native package should work. * https://webpack.js.org/configuration/resolve/#resolvealias
Thanks for your response.
The Chrome extension is written in pure React + Typescript not React Native.
I will take a look at the link related to aliasing the fs
dependency and report back if it works.
Possible the new release might fix it as well if it was an issue in zenfs that was updated: https://github.com/LibertyDSNP/parquetjs/releases/tag/v1.8.4
This issue is kind of a message in a bottle type of issue, I don't really think that there is anything wrong with the dependency but I am looking for help. If it's not the right place, then by all means, please close the issue.
Basically, I am trying to create a Parquet file through a browser extension. Browser extensions do not have access to the Node APIs so I opted to use the browser version of this dependency.
Steps to reproduce
The extension is written in typescript.
This is my tsconfig:
This is my current webpack config:
The dependencies versions' are:
I have file where I import the dependency and its types as such:
and then call the
openFile
function as such:Filename is just a random name.
I have a website with the same functionality so I know that my implementation is correct. After doing a bit of digging, I think the issue is related to the
fs
dependency which in the browser is replaced byzenfs
if I am correct.Expected behaviour
I am expecting the data to be added to the file.
Actual behaviour
Nothing happens, my best guess it that the stream never opens and therefore the promise in the function
osopen
never resolves.I can see the first console.log output from the example code I provided above but not the second one which should have been called once the stream was open.
Any logs, error output, etc?
No errors, no logs, the process juts hangs indefinitely.
...
Any other comments?
I realize this is a bit of a long shot and that my use case is very niche but I am open to trying anything to make this work. ...