aragon / connect

(Aragon 1) Seamlessly integrate DAO functionality into web and node.js apps.
https://aragon.org/connect
GNU Lesser General Public License v3.0
145 stars 53 forks source link

connectVoting() not exported correctly from module #304

Open 0x44616564616c7573 opened 3 years ago

0x44616564616c7573 commented 3 years ago

When testing the standard voting example from the user guide using both CommonJS and ES6 on NodeJS 14 LTS and 15, connectVoting() is not being correctly exported as a default or named function. This breaks the standard voting DAO app connector instructions from the project's quick start guide, and may be related to issue #232. I'm not sure if this affects other app connectors, but it may be the case that they also are broken. I have also had the issue confirmed by another person I'm working with on a project on a separate device, so it's not localized to me. I've been able to test this against v0.8.0-alpha, v0.7.3, and v0.7.0 from npm of @aragon/connect-voting, while using @aragon/connect v0.7.0.

0x44616564616c7573 commented 3 years ago

For clarity, the example I am referring to is this one: import connect from '@aragon/connect' import connectVoting from '@aragon/connect-voting'

const org = await connect('example.aragonid.eth', 'thegraph')

// Connect the Voting app using the corresponding connector: const voting = connectVoting(org.app('voting')) // <--- Failure occurs here

// Fetch votes of the Voting app const votes = await voting.votes()

daviddavo commented 3 years ago

I'm having the same problem with @aragon/connect-finance and connectFinance. Searching on the GitHub code, these functions don't exist any more. Is this a docs problem?

Barukimang commented 2 years ago

@daviddavo for me to better understand, which Doc within the Connect Docs exactly are you using? https://hack.aragon.org/developers/tools/aragon-connect