Want to update neosound, having ES module errors (noob question)

trying to update neosound so that it uses latest wagmi, rainbowkit (maybe migrate to connect kit), and is able to mint zora drops (which now include a fee). in any case, i’m running into ES module issues:

Instead change the require of index.js in ~/neosound/node_modules/@public-assembly/curation-interactions/dist/public-assembly-curation-interactions.cjs.dev.js to a dynamic import() which is available in all CommonJS modules.

i believe the error is with how this is formatted:

Object.defineProperty(exports, ‘__esModule’, { value: true });

var wagmi = require(‘wagmi’);

var React = require(‘react’);

var ethers = require(‘ethers’);

var zdk = require(‘@zoralabs/zdk’);

var utils = require(‘ethers/lib/utils’);

have two questions:

is it simply a formatting issue? if i fix this locally will the file in that package need to be fixed to avoid future issues for folks wanting to use an updated version of neosound?

any guidance on reading material would be greatly appreciated

I think the fee would need to be added into either the zora-drops-utils package or erc721-drops-minter.

There’s not really documentation on either of those things, but my guess is that for them to function correctly hardcoding the fee in would be necessary.

zora-drops-utils has a wagmi dependency at 6.6 so that is probably why it is breaking when trying to update wagmi and rainbowkit.

I don’t know how much sense it makes for us to attempt to maintain these packages, it might be easier to just write new mint logic, but I also haven’t looked at Neosound in a minute and can’t say how time consuming that would be.

1 Like

+1 to what @salief is saying about the Zora-drop-utils lib needing to be updated. I ran into that when building the CC0lab site a while ago.

That said, it looks like the code is expecting to load wagmi as a commonjs module but is finding an ES module instead. This may be due to a change in wagmi your package.json file or something else.

If you have ”type”: “module” in your package.json, try removing it.

1 Like