[Reactjs][GeckoDriver] O_CREAT", _c.fs is undefined in ./node_modules/tmp/lib/tmp.js
See original GitHub issue🐛 Bug Report
I want run Selenium inside a component but “TypeError: _c.fs is undefined.” I got also “TypeError: can’t access property “O_CREAT”, _c.fs is undefined”
To Reproduce
create react app and use inside random/dummy component and above all: trigger this with button 😃 copy/past
async function getHtml(url: string) {
const driver = await new Builder().forBrowser("firefox").build();
let res = "<div></div>"
try {
await driver.get(url);
res = await driver.getPageSource();
}
finally {
await driver.quit();
return res
}
}
Expected behavior
not throwing error and get the html.
Environment
OS: Windows 10? OSX Browser: Geckodriver Browser version: my browser version is Mozilla 86/87 Browser Driver version: GeckoDriver 0.29.0 Language Bindings version: node v15.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
i get undefined when i run node js code while trying to read a ...
I think I made a mistake in the name of the file, now it's working perfectly. [Error: ENOENT: no such file or directory, ......
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 FreeTop 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
Top GitHub Comments
The main reason that this if failing is that we need to use
fs
to be able to do manipulations on the disk for things like upload.We would need to go through all the code to see where this is directly needed as I am sure a lot of it is down to legacy reasons. There are genuine reasons why we need to use
fs
like checking the driver executables are accessible so I don’t think we can action this bug.Thanks for letting us know about it though.
got some news :
https://www.npmjs.com/package/react-reconciler (link to reactJS …) from https://github.com/koba04/react-fs …
maybe i got none feedback from reactjs, I will wait few days more…