question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rollup: missing export of Buffer

See original GitHub issue

NOTE: if you are using stencil with rollup-plugin-node-polyfills, pass an exclude option

I got the bellow error when I use xlsx module with stenciljs with MAC machine. Module is working fine in windows. Rollup: Missing Export: ./node_modules/xlsx/dist/cpexcel.js:1:9

‘Buffer’ is not exported by node-resolve:empty.js, imported by

./node_modules/xlsx/dist/cpexcel.js

L1: /*! cpexcel.js © 2013-present SheetJS – http://sheetjs.com */

L2: /*jshint -W100 */

Thanks in advance

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, Oct 5, 2021

Thanks @MarkChrisLevy , the issue can be reproduced using that plugin and your solution works. Unfortunately that option is not in the plugin docs 😦

The raw rollup demo works with the polyfills plugin, probably because it also uses rollup-plugin-node-resolve (now @rollup/plugin-node-resolve)

1reaction
reviewhercommented, Aug 31, 2021

https://github.com/SheetJS/sheetjs/tree/master/demos/rollup#required-plugins mentions some override:

import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
export default {
	/* ... */
	plugins: [
		resolve({
			module: false, // <-- this library is not an ES6 module
			browser: true, // <-- suppress node-specific features
		}),
		commonjs()
	],
	/* ... */
};

Does that help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Missing exports" when bundling wasm with rollup
I suppose it has to do with either my bundler config or the way I import() the wasm deps in my typescript code....
Read more >
rollup.js
You can export an array from your config file to build bundles from several unrelated inputs at once, even in watch mode. To...
Read more >
Data Export FAQ - Salesforce Help
Why are export files missing even though I am within the 48 hour window? The export files are removed as soon as a...
Read more >
rollup | Yarn - Package Manager
rollup. owner rollup41.8mMIT3.8.1TS vulns 0 vulnerabilities. Next-generation ES module bundler. modules, bundler, bundling, es6 ...
Read more >
Webpack 5 Issues | Documentation - Web3Auth
Install react-app-rewired and the missing modules into your application ... url buffer process rollup-plugin-node-builtins rollup-plugin-node-polyfills ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found