RJ
RJ3y ago

After upgrading to `0 3 0` I m seeing

After upgrading to 0.3.0 I'm seeing the following errors when running npx convex dev:
12 Replies
RJ
RJOP3y ago
�Preparing Convex functions...
✘ [ERROR] Could not resolve "@tiptap/core"

src/tiptap-schema-extensions.ts:1:26:
1 │ import { getSchema } from "@tiptap/core";
╵ ~~~~~~~~~~~~~~

The "main" field here was ignored. Main fields must be configured explicitly when using the
"neutral" platform.

node_modules/@tiptap/core/package.json:18:2:
18 │ "main": "dist/tiptap-core.cjs.js",
╵ ~~~~~~

You can mark the path "@tiptap/core" as external to exclude it from the bundle, which will remove
this error.

✘ [ERROR] Could not resolve "@tiptap/extension-underline"

src/tiptap-schema-extensions.ts:2:22:
2 │ import Underline from "@tiptap/extension-underline";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The "main" field here was ignored. Main fields must be configured explicitly when using the
"neutral" platform.

node_modules/@tiptap/extension-underline/package.json:15:2:
15 │ "main": "dist/tiptap-extension-underline.cjs.js",
╵ ~~~~~~

You can mark the path "@tiptap/extension-underline" as external to exclude it from the bundle,
which will remove this error.

✘ [ERROR] Could not resolve "@tiptap/starter-kit"

src/tiptap-schema-extensions.ts:3:23:
3 │ import StarterKit from "@tiptap/starter-kit";
╵ ~~~~~~~~~~~~~~~~~~~~~

The "main" field here was ignored. Main fields must be configured explicitly when using the
"neutral" platform.

node_modules/@tiptap/starter-kit/package.json:15:2:
15 │ "main": "dist/tiptap-starter-kit.cjs.js",
╵ ~~~~~~

You can mark the path "@tiptap/starter-kit" as external to exclude it from the bundle, which will
remove this error.

Error: Unable to bundle Convex modules
esbuild failed: Error: Build failed with 3 errors:
src/tiptap-schema-extensions.ts:1:26: ERROR: Could not resolve "@tiptap/core"
src/tiptap-schema-extensions.ts:2:22: ERROR: Could not resolve "@tiptap/extension-underline"
src/tiptap-schema-extensions.ts:3:23: ERROR: Could not resolve "@tiptap/starter-kit"
�Preparing Convex functions...
✘ [ERROR] Could not resolve "@tiptap/core"

src/tiptap-schema-extensions.ts:1:26:
1 │ import { getSchema } from "@tiptap/core";
╵ ~~~~~~~~~~~~~~

The "main" field here was ignored. Main fields must be configured explicitly when using the
"neutral" platform.

node_modules/@tiptap/core/package.json:18:2:
18 │ "main": "dist/tiptap-core.cjs.js",
╵ ~~~~~~

You can mark the path "@tiptap/core" as external to exclude it from the bundle, which will remove
this error.

✘ [ERROR] Could not resolve "@tiptap/extension-underline"

src/tiptap-schema-extensions.ts:2:22:
2 │ import Underline from "@tiptap/extension-underline";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The "main" field here was ignored. Main fields must be configured explicitly when using the
"neutral" platform.

node_modules/@tiptap/extension-underline/package.json:15:2:
15 │ "main": "dist/tiptap-extension-underline.cjs.js",
╵ ~~~~~~

You can mark the path "@tiptap/extension-underline" as external to exclude it from the bundle,
which will remove this error.

✘ [ERROR] Could not resolve "@tiptap/starter-kit"

src/tiptap-schema-extensions.ts:3:23:
3 │ import StarterKit from "@tiptap/starter-kit";
╵ ~~~~~~~~~~~~~~~~~~~~~

The "main" field here was ignored. Main fields must be configured explicitly when using the
"neutral" platform.

node_modules/@tiptap/starter-kit/package.json:15:2:
15 │ "main": "dist/tiptap-starter-kit.cjs.js",
╵ ~~~~~~

You can mark the path "@tiptap/starter-kit" as external to exclude it from the bundle, which will
remove this error.

Error: Unable to bundle Convex modules
esbuild failed: Error: Build failed with 3 errors:
src/tiptap-schema-extensions.ts:1:26: ERROR: Could not resolve "@tiptap/core"
src/tiptap-schema-extensions.ts:2:22: ERROR: Could not resolve "@tiptap/extension-underline"
src/tiptap-schema-extensions.ts:3:23: ERROR: Could not resolve "@tiptap/starter-kit"
ballingt
ballingt3y ago
huh, sounds like something about the bundling process changed! Is this repo open, can I try to repro by cloning and updating it?
RJ
RJOP3y ago
It's not, but I can share it with you if you'd like!
ballingt
ballingt3y ago
that'd be great, thank you! is this the project you had to change the tsconfig.json for in order to get the prosemirror diff library to work in convex functions? I'm guessing that is not related, reading more carefully
RJ
RJOP3y ago
Yes, although I threw away most of the original code at some point; but I think the altered tsconfig.json remained What's your GitHub username?
ballingt
ballingt3y ago
thomasballinger
RJ
RJOP3y ago
Invite sent With read access, so I assume you'll be able to clone from the CLI!
ballingt
ballingt3y ago
I haven't tested yet but I see the issue, as of 0.3.0 convex uses "neutral" instead of "browser" for compiling Convex functions with esbuild which is causing different library builds to be pulled in. I'll make sure this is the issue but I'd recommend not upgrading until we fix this. I think it'd be hard to override these because there're cross library imports that tiptap is doing.
RJ
RJOP3y ago
Sounds good, I'll wait then 🙂 Thank you for the help!
ballingt
ballingt3y ago
thanks for reporting + patience!
RJ
RJOP3y ago
I'll leave your repo access at least until this is fixed, in case it's helpful to test against
ballingt
ballingt3y ago
Just published 0.3.1 which should fix this!

Did you find this page helpful?