onflow / nft-catalog

https://www.flow-nft-catalog.com/
The Unlicense
36 stars 13 forks source link

Nft catalog not working in web enviroment #94

Open PeterBenc opened 1 year ago

PeterBenc commented 1 year ago

Issue:

prpatel05 commented 1 year ago

What npm version of the package are you using? Are you able to share the code that you are using to import and use the package?

PeterBenc commented 1 year ago

The latest from the npm, I dont have my PC here, but I literaly started working with it today. 0.1.1 I think.

I can't really share the my code, but my guess is that it will be the same issue sinple create-react-app since the bundle.js uses global which is not accessible in the browser. At least according to that stack overflow issue.

ccarnicle commented 1 year ago

I am also running a react app and having the same "Global is not defined" issue.

austinsamsel commented 1 year ago

i think the problem is in the webpack config. nft-catalog is being bundled up for use in a node app: https://github.com/dapperlabs/nft-catalog/blob/main/webpack.config.js#L4

we can add a secondary config that bundles this up for client-side consumption