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

Dante3 not working with vite #257

Closed
wandersonalwes opened this issue Dec 7, 2022 · 7 comments
Closed

Dante3 not working with vite #257

wandersonalwes opened this issue Dec 7, 2022 · 7 comments

Comments

@wandersonalwes
Copy link

I get this error

✘ [ERROR] Could not resolve "prosemirror-history"

    node_modules/@tiptap/extension-history/dist/tiptap-extension-history.esm.js:2:36:
      2 │ import { undo, redo, history } from 'prosemirror-history';~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "prosemirror-history" as external to exclude it from the bundle, which will
  remove this error.

✘ [ERROR] Could not resolve "prosemirror-gapcursor"

    node_modules/@tiptap/extension-gapcursor/dist/tiptap-extension-gapcursor.esm.js:2:26:
      2 │ import { gapCursor } from 'prosemirror-gapcursor';~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "prosemirror-gapcursor" as external to exclude it from the bundle, which
  will remove this error.

✘ [ERROR] Could not resolve "prosemirror-dropcursor"

    node_modules/@tiptap/extension-dropcursor/dist/tiptap-extension-dropcursor.esm.js:2:27:
      2 │ import { dropCursor } from 'prosemirror-dropcursor';~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "prosemirror-dropcursor" as external to exclude it from the bundle, which
  will remove this error.

/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:1575
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 3 errors:
node_modules/@tiptap/extension-dropcursor/dist/tiptap-extension-dropcursor.esm.js:2:27: ERROR: Could not resolve "prosemirror-dropcursor"
node_modules/@tiptap/extension-gapcursor/dist/tiptap-extension-gapcursor.esm.js:2:26: ERROR: Could not resolve "prosemirror-gapcursor"
node_modules/@tiptap/extension-history/dist/tiptap-extension-history.esm.js:2:36: ERROR: Could not resolve "prosemirror-history"
    at failureErrorWithLog (/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:1575:15)
    at /Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:1033:28
    at runOnEndCallbacks (/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:1447:61)
    at buildResponseToResult (/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:1031:7)
    at /Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:1143:14
    at responseCallbacks.<computed> (/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:680:9)
    at handleIncomingPacket (/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:735:9)
    at Socket.readFromStdout (/Users/wanderson/www/ei/community/dante3/node_modules/esbuild/lib/main.js:656:7)
    at Socket.emit (node:events:526:28)
    at addChunk (node:internal/streams/readable:315:12) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 27,
        file: 'node_modules/@tiptap/extension-dropcursor/dist/tiptap-extension-dropcursor.esm.js',
        length: 24,
        line: 2,
        lineText: "import { dropCursor } from 'prosemirror-dropcursor';",
        namespace: '',
        suggestion: ''
      },
      notes: [
        {
          location: null,
          text: 'You can mark the path "prosemirror-dropcursor" as external to exclude it from the bundle, which will remove this error.'
        }
      ],
      pluginName: '',
      text: 'Could not resolve "prosemirror-dropcursor"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 26,
        file: 'node_modules/@tiptap/extension-gapcursor/dist/tiptap-extension-gapcursor.esm.js',
        length: 23,
        line: 2,
        lineText: "import { gapCursor } from 'prosemirror-gapcursor';",
        namespace: '',
        suggestion: ''
      },
      notes: [
        {
          location: null,
          text: 'You can mark the path "prosemirror-gapcursor" as external to exclude it from the bundle, which will remove this error.'
        }
      ],
      pluginName: '',
      text: 'Could not resolve "prosemirror-gapcursor"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 36,
        file: 'node_modules/@tiptap/extension-history/dist/tiptap-extension-history.esm.js',
        length: 21,
        line: 2,
        lineText: "import { undo, redo, history } from 'prosemirror-history';",
        namespace: '',
        suggestion: ''
      },
      notes: [
        {
          location: null,
          text: 'You can mark the path "prosemirror-history" as external to exclude it from the bundle, which will remove this error.'
        }
      ],
      pluginName: '',
      text: 'Could not resolve "prosemirror-history"'
    }
  ],
  warnings: []
}

I tried it

yarn add prosemirror-dropcursor prosemirror-gapcursor prosemirror-history

but i get this other error

Captura de Tela 2022-12-07 às 12 06 47

https://codesandbox.io/s/dante3-with-vite-olulg6

@michelson
Copy link
Owner

Hi, I guess this could be a problem with prosemirror?

@wandersonalwes
Copy link
Author

This happens in newer versions of tiptap

@michelson
Copy link
Owner

michelson commented Dec 9, 2022 via email

@michelson
Copy link
Owner

which versions are you using? is not easy to follow what is not working here.
I have dante3 up and running in other projects so not sure if you are using the same versions.
this is what Dante3 uses when you install it.
image

@michelson
Copy link
Owner

also, the latest version is 1.1.6

@wandersonalwes
Copy link
Author

@michelson
Captura de Tela 2022-12-09 às 17 32 26

@wandersonalwes
Copy link
Author

Solution #259 worked for me, so I'm closing this issue.

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

2 participants