jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.44k stars 776 forks source link

TypeError: Cannot read property 'withFileTypes' on null #951

Closed AwesomeSam9523 closed 1 year ago

AwesomeSam9523 commented 2 years ago

image Code:

await new Promise(resolve => {
    fse.copy('path/to/a', 'path/to/b', { overwrite: true, recursive: true }, err => {
        if (err)
            throw err;
        resolve();
    });
});

or

await fse.copy('path/to/a', 'path/to/b', { overwrite: true, recursive: true })

or

fse.copy('path/to/a', 'path/to/b', { overwrite: true, recursive: true }).then()

Basically async copy dir fails.

RyanZim commented 2 years ago

What version of electron is this?

AwesomeSam9523 commented 2 years ago

@RyanZim v9.4.4

AwesomeSam9523 commented 2 years ago

Hi any update? The app goes "not responding" as its sync and crashes. My bug reports are spammed due to this..

RyanZim commented 2 years ago

I'm not sure what's causing this. Electron v9 is out of date and unsupported, so that may be a factor.

jstlroot commented 2 years ago

Same problem using Electron 13. Not compatible with asar.

RyanZim commented 2 years ago

@jstlroot This is something we'd like to fix; what function are you encountering this with?

RyanZim commented 1 year ago

Closing since information is not forthcoming. If you're experiencing this problem, please open a new issue with a MCVE.