maddy
maddy2y ago

Getting identifier conflict when deploying on Vercel

node_modules/@types/web/index.d.ts(7,1): error TS6200: Definitions of the following identifiers conflict with those in another file: NodeFilter, XPathNSResolver, SVGMatrix, WebKitCSSMatrix, SVGPoint, SVGRect, location, webkitURL, ImportExportKind, TableKind, ValueType, ExportValue, Exports, ImportValue, Imports, ModuleImports, ElementTagNameMap, name, AlgorithmIdentifier, BigInteger, BinaryData, BlobPart, BodyInit, BufferSource, COSEAlgorithmIdentifier, I am working in a javascript codebase so I setup convex without typescript support. It works locally but when I deploy on Vercel I get the above error. Is there an easy fix for this?
5 Replies
ballingt
ballingt2y ago
Do you see the same output when you run npm run build locally? It might help to see more of the error logs, so we know which command is causing this. It looks like there's a TypeScript step running even though your project is JavaScript. Is there a jsconfig.json or a tsconfig.json in your project?
maddy
maddyOP2y ago
npm run build succeeds locally. Yes there is a tsconfig.json in my repo because it is an existing NextJS app to which I added Convex. It is not a vite app btw. { "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, "types": ["vitest/globals"], "paths": { "@/": ["./"] } }, "include": ["next-env.d.ts", "/*.ts", "/*.tsx"], "exclude": ["node_modules"] }
ballingt
ballingt2y ago
In the deploy logs, do you see what command caused the error you posted? Happen to know how this project was set up? I can spin up a Next.js project to try, guessing that I should use TypeScript in the wizard, but write pages in JS?
maddy
maddyOP2y ago
Hi Tom thanks for offering to help here. Let me get back to you on this and try to give you more reproducible logs.
ballingt
ballingt2y ago
Thanks. If it's possible to share the code that would be fine too, I'm tom@convex.dev, but a smaller repro is always great

Did you find this page helpful?