Skip to content

Module "@udecode/plate-alignment/react" and its corresponding type declarations.ts(2307) not found #3558

Answered by abhi-bc
mrthoabby asked this question in Q&A
Discussion options

You must be logged in to vote

We figured out one way to resolve this without changing moduleResolution to bundler

In tsconfig.json:

{
  "compilerOptions": {
    moduleResolution: "node",
    paths: {
      "@udecode/plate-common/react": [
        "<path/to/node_modules>/@udecode/plate-common/dist/react/index.d.ts"
      ],
      "@udecode/plate-core/react": [
        "<path/to/node_modules>/@udecode/plate-core/dist/react/index.d.ts"
      ],
      "@udecode/plate-list/react": [
        "<path/to/node_modules>/@udecode/plate-list/dist/react/index.d.ts"
      ],
      // do the same for all @udecode/plate-*/react packages...
    }
  }
}

and in vite.config.ts

defineConfig({
  // ...otherConfig
  resolve: {
    alias: {
…

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
2 replies
@George-field
Comment options

@abhi-bc
Comment options

abhi-bc Dec 25, 2024
Collaborator

Comment options

You must be logged in to vote
1 reply
@lucaspereirasouzat
Comment options

Comment options

You must be logged in to vote
6 replies
@abhi-bc
Comment options

abhi-bc Oct 23, 2024
Collaborator

@abhi-bc
Comment options

abhi-bc Oct 24, 2024
Collaborator

@zbeyens
Comment options

@abhi-bc
Comment options

abhi-bc Oct 25, 2024
Collaborator

Answer selected by zbeyens
@az-nextsec
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
9 participants
Converted from issue

This discussion was converted from issue #3557 on September 20, 2024 13:49.