Closed abigpotostew closed 1 year ago
Having kind of the same issue.
./node_modules/@cosmos-kit/react/node_modules/@cosmos-kit/core/dist/index.js:11570:0
Module not found: Can't resolve 'fs'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@cosmos-kit/react/module/provider.js
./node_modules/@cosmos-kit/react/module/index.js
./pages/_app.tsx
Even if you rollback to prev versions - error occurs anyway.
@abigpotostew Thanks for reporting the issue. Do you mind pushing the code to github and send us a link. So I can test it out to see what's wrong ?
hey @Jorah-M and @abigpotostew you realize that you're using the prerelease? Are you intending to do this?
@abigpotostew Thanks for reporting the issue. Do you mind pushing the code to github and send us a link. So I can test it out to see what's wrong ?
You can clone this https://github.com/abigpotostew/microcosmbot and run yarn dev
from apps/web
package and navigate to localhost:3000 in your browser. You will see the error immediately.
hey @Jorah-M and @abigpotostew you realize that you're using the prerelease? Are you intending to do this?
I've tried several versions between v1.3.12 and 1.3.32 and all have similar errors. I found that v1.3.12 works because that is was is setup in the code templates.
I got a version working now. Here's the versions of libraries I'm using:
- "@cosmos-kit/core": "1.3.0",
- "@cosmos-kit/cosmostation": "0.15.13",
- "@cosmos-kit/keplr": "0.33.13",
- "@cosmos-kit/leap": "0.14.12",
- "@cosmos-kit/react": "1.3.11",
- "@keplr-wallet/cosmos": "^0.12.9",
+ "@cosmos-kit/core": "1.6.0",
+ "@cosmos-kit/cosmostation": "0.15.37",
+ "@cosmos-kit/keplr": "0.33.39",
+ "@cosmos-kit/react": "1.3.31",
+ "@cosmos-kit/walletconnect": "0.3.16",
+ "@keplr-wallet/cosmos": "0.12.11",
@abigpotostew I can't run your code because it requires some private packages.
Based on the error
Module not found: Can't resolve 'fs'
Maybe you can try update your next.config.js
module.exports = {
reactStrictMode: true,
transpilePackages: ['@nouns-stream/ui', '@microcosms/bot', '@microcosms/db'],
webpack(config, { isServer }) {
if (!isServer) {
config.resolve.fallback = {
fs: false
}
}
config.module.rules.push({
test: /\.svg$/i,
issuer: { and: [/\.(js|ts|md)x?$/] },
use: ['@svgr/webpack'],
})
return config
},
}
I tried creating a new project with create-cosmos-app
and upgrade @cosmos-kit/react
to version 1.3.32
.
And it works fine.
npm install -g create-cosmos-app
cca --name send-example --example --template send-tokens
I'm glad that you got a version working for you. And if you can provide a minimum codebase that can reproduce the error. Please send it to us. Thanks. @abigpotostew
@Jorah-M Can you upload a minimum codebase to github that can reproduce the error ? Thanks!
It seems to work when I changed the version to 1.3.32 and deleted old node_modules. I got a private repo with some packages as well, so I'm afraid I can't reproduce it somewhere.
@Jorah-M That's great! If you find any more issues, feel free to submit to us. Thanks!
Same here, I am not able to reproduce it reliably. Since I found a working version, I will close this issue. Thanks.
Using next js, copied over the code from a template I get this error on verion
Using the latest version
1.3.33-prerelease.1
I seeUsing older version, v1.3.12+ I get a slightly different error:
1.3.11 is the last version that works for me.