-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
TypeError: checkDiskSpace is not a function #30
Comments
Are you using a bundler like webpack or Vite? We encountered this issue switching to Vite. |
Seems like the function we want gets exported as "default" in an object:
|
Export is done here: Lines 175 to 182 in 9309706
I do not see why it cannot work :/ |
I can modify it this way
|
I guess there's a problem here : default: [Function: checkDiskSpace], |
Yeah that seems correct, but
|
having the same issue with a electron/vite/ts setup Quickly testing, using the following works for the time being:
|
Update: Rollup JS's current docs recommend against using mixed name and default exports. It looks like webpack or some existing tooling has allowed it to work until now. There is an explainer towards the bottom of
|
Should I release a new major version and expose everything explicitly to remove the default export? |
Sounds good to me. I can test the new version you release from my end |
why not do just one export?
|
That's exactly what I meant: expose everything explicitly ^^ |
mac os: 14.3.1 (23D60)
node: 16.15.1
electron: 22.3.27
check-disk-space: 3.4.0
Prompt TypeError: checkDiskSpace is not a function. I called it in the main process
The text was updated successfully, but these errors were encountered: