Closed javiash closed 1 year ago
Well, I couldn't solve it, but I could find "something"...
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"maxNodeModuleJsDepth": 10,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": ".",
"paths": {
"@/components/*": ["components/*"],
"@/gql/*": ["gql/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
If I remove "maxNodeModuleJsDepth" I can't import processRequest as it says that it's missing its type declarations, and if I leave it it's giving me this type error in the processRequest file.
I'm using pnpm to install my packages.
Did you try what the TypeScript error message suggested; setting the target
to something higher than what you have (which probably has problems with for ... of iteration), perhaps "es2015"
?
Closing because this issue isn't to do with graphql-upload
, but rather how your specific project is configured.
Next.js shouldn't be transpiling server dependencies like graphql-upload
to old ES syntax; Node.js can handle running graphql-upload
without any transpilation at all.
Hi! Thanks, @jaydenseric for this package. I had some issues trying to make it work with apollo server 4, but now everything is working perfectly... With the only exception when I try to build my nextjs project. This is what I'm getting:
In dev environment is working as expected, it's only when I try to build the project.
My package.json: