Comments (7)
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)
from rollup-plugin-node-externals.
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?
from rollup-plugin-node-externals.
no, it's different. Doesn't say exactly what's wrong, doesn't even mention this plugin by name.
from rollup-plugin-node-externals.
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
🤷)
from rollup-plugin-node-externals.
This is hopefully fixed in 3.1.1. Please let me know.
from rollup-plugin-node-externals.
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
from rollup-plugin-node-externals.
👍 Thank you very much!
from rollup-plugin-node-externals.
Related Issues (20)
- `exclude` only works on module names, not import paths HOT 6
- Must use `rollup.config.mjs` in a `type: module` package HOT 1
- `find-up` not found in 3.1.1 in the ESM build HOT 2
- Doesn't work on Node 12 HOT 3
- is `rollup` supposed to be listed under `engines`? HOT 1
- Support rollup v3 HOT 4
- ... is not assignable to type 'PluginOption' HOT 4
- if use rollup-plugin-postcss some pkg not bundled in HOT 5
- some question about 'include' vs 'exclude' HOT 2
- RollupError: Entry module "./src/node/index.ts" cannot be external. HOT 1
- Allow disabling node builtins handling entirely HOT 3
- Error: No "exports" main defined HOT 2
- feature: externalize imports from the same package HOT 6
- Missing "types" in package.json HOT 4
- Question about dev dependencies. HOT 8
- Upgrade to Rollup 4.0 HOT 2
- Not working with vite? HOT 5
- Question about defaults HOT 4
- TypeError: Cannot read properties of undefined (reading 'length'), error when using with vitest HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rollup-plugin-node-externals.