Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 14 issues #388

Open
liujun93 opened this issue Dec 25, 2023 · 6 comments
Open

Next 14 issues #388

liujun93 opened this issue Dec 25, 2023 · 6 comments
Assignees

Comments

@liujun93
Copy link
Contributor

liujun93 commented Dec 25, 2023

From Discord dgabri3le | Gelotto:

Getting these errors while using CK within next14 app router:

image

Moved everything over into the old pages router
No more hydration error, but when the modal opens up, I'm getting

image

The 50 error messages are all Failed to decode downloaded font: https://fonts.googleapis.com/css?family=Inter
I had removed next/font with this repo
I can add it back in, but perhaps its best not to have CK assume it's there -- if that's indeed what's happening. Not sure yet
Added next/font back but no difference

app      |  ○ Compiling / ...
app      |  ⚠ ./node_modules/pino/lib/tools.js
app      | Module not found: Can't resolve 'pino-pretty' in '/usr/src/node_modules/pino/lib'
app      | 
app      | Import trace for requested module:
app      | ./node_modules/pino/lib/tools.js
app      | ./node_modules/pino/pino.js
app      | ./node_modules/@walletconnect/logger/dist/cjs/index.js
app      | ./node_modules/@walletconnect/sign-client/dist/index.es.js
app      | ./node_modules/@cosmos-kit/walletconnect/esm/client.js
app      | ./node_modules/@cosmos-kit/walletconnect/esm/index.js
app      | ./node_modules/@cosmos-kit/keplr-mobile/esm/wallet-connect/chain-wallet.js
app      | ./node_modules/@cosmos-kit/keplr-mobile/esm/wallet-connect/index.js
app      | ./node_modules/@cosmos-kit/keplr-mobile/esm/index.js
app      | ./node_modules/@cosmos-kit/keplr/esm/index.js
app      | ./app/layout.tsx
app      | [DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.
app      | [DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.
app      | [DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937
app      |  ⚠ ./node_modules/pino/lib/tools.js
app      | Module not found: Can't resolve 'pino-pretty' in '/usr/src/node_modules/pino/lib'
@liujun93 liujun93 self-assigned this Dec 25, 2023
@yyyyaaa
Copy link
Contributor

yyyyaaa commented Dec 25, 2023

@liujun93 can I take this? it's tied to interchain ui compatibility with app router

@liujun93
Copy link
Contributor Author

@yyyyaaa sure

@liujun93 liujun93 assigned liujun93 and yyyyaaa and unassigned liujun93 Dec 25, 2023
@baktun14
Copy link

I get the same error

@yyyyaaa
Copy link
Contributor

yyyyaaa commented Jan 23, 2024

Hey guys! Sorry for the delay, I was focusing on other issues, will get this fixed today

@agonist
Copy link

agonist commented Feb 7, 2024

For the "pino-pretty" error you can update your next config this way:

const nextConfig = {
  webpack: (config) => {
    config.externals.push("pino-pretty");
    return config;
  },
}

on my side the issue I get is from importing import "@interchain-ui/react/styles"; in my layout.
but if I import both:

import "@interchain-ui/react/globalStyles";
import "@interchain-ui/react/styles";

Then its working and I dont get any compilation issue.

I'm using Next 14.1.0 with app router. I wrap my app within this component:

"use client";

import * as React from "react";

import { ChainProvider } from "@cosmos-kit/react";
import { chains, assets } from "chain-registry";
import { wallets } from "@cosmos-kit/keplr";
import "@interchain-ui/react/globalStyles";
import "@interchain-ui/react/styles";

export function CosmosProvider({ children }: { children: React.ReactNode }) {
  return (
    <ChainProvider
      chains={chains} // supported chains
      assetLists={assets} // supported asset lists
      wallets={wallets} // supported wallets
      //   walletConnectOptions={...} // required if `wallets` contains mobile wallets
    >
      {children}
    </ChainProvider>
  );
}

Hopefully it can help solving your issue.

@MbBrainz
Copy link

MbBrainz commented Apr 3, 2024

@agonist This solved the issue for me, Thanks!

For the "pino-pretty" error you can update your next config this way:

const nextConfig = {
  webpack: (config) => {
    config.externals.push("pino-pretty");
    return config;
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants