Skip to content
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

change of type crashes my electron app #11

Closed
hmt opened this issue Dec 14, 2021 · 7 comments
Closed

change of type crashes my electron app #11

hmt opened this issue Dec 14, 2021 · 7 comments

Comments

@hmt
Copy link

hmt commented Dec 14, 2021

Ever since v3 my electron app won't run because rollup complains about a mixup between commonjs and esm. I had to revert to v2 and that works just fine for me.
Anyway, thank you very much for your plugin!

@lmestel
Copy link

lmestel commented Dec 14, 2021

I just run into the same issue.

find-up version 6 is ESM only, so const findUp = require('find-up'); (from your dist/cjs/index.js) throws an error:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Modul

Edit: I'm working on an ordinary node setup (no electron)

@Septh
Copy link
Owner

Septh commented Dec 14, 2021

Oh dear. TBH, I'm beginning to get really, really, really tired of those commonjs/esm issues 😢

@lmestel > could you please try with 3.0.0 and tell me if it works? find-up was mistakenly bundled in 3.0.0, which is why I released 3.0.1 in the first place. But in the end, it might just be the right way to go.

@hmt > is your issue the same as @lmestel's or completely different?

@hmt
Copy link
Author

hmt commented Dec 14, 2021

no, it's different. Doesn't say exactly what's wrong, doesn't even mention this plugin by name.

@lmestel
Copy link

lmestel commented Dec 14, 2021

I'm beginning to get really, really, really tired of those commonjs/esm issues

I feel you!

could you please try with 3.0.0

Oh, I didn't mention, that the error ocoured with version 3.1.0.
With 3.0.0 the build workes! 👍
But I had to change const externals = require('rollup-plugin-node-externals'); into const { default: externals } = require('rollup-plugin-node-externals'); (otherwise I get TypeError: externals is not a function 🤷)

@Septh
Copy link
Owner

Septh commented Dec 15, 2021

This is hopefully fixed in 3.1.1. Please let me know.

@Septh Septh closed this as completed Dec 15, 2021
@hmt
Copy link
Author

hmt commented Dec 15, 2021

Thank you! It works again. I don't even know why I need your plugin but it somehow solves a bunch of issues I have when trying to build my app without :S

@lmestel
Copy link

lmestel commented Dec 15, 2021

👍 Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants