jaydenseric / graphql-upload

Middleware and an Upload scalar to add support for GraphQL multipart requests (file uploads via queries and mutations) to various Node.js GraphQL servers.
https://npm.im/graphql-upload
MIT License
1.43k stars 131 forks source link

Error: No "exports" main defined in graphql-upload/package.json #309

Closed strangeweb3guy closed 2 years ago

strangeweb3guy commented 2 years ago

Have installed graphql-upload, do import import { graphqlUploadExpress } from 'graphql-upload'; And getting this error: Error: No "exports" main defined in graphql-upload/package.json

Dependencies:

"graphql-upload": "^14.0.0",
"graphql": "15.8.0",
"graphql-request": "^4.2.0",
"graphql-tools": "^8.2.0",
"@nestjs/axios": "^0.0.7",
"@nestjs/common": "^8.4.1",
"@nestjs/config": "^1.1.5",
"@nestjs/core": "^8.4.1",
"@nestjs/graphql": "^9.1.2",
"@nestjs/platform-express": "^8.0.0",

The version of node: v16.10.0

jaydenseric commented 2 years ago

Duplicates https://github.com/jaydenseric/graphql-upload/issues/305 , see here for an explanation:

https://github.com/jaydenseric/graphql-upload/issues/305#issuecomment-1134736158

And here for what you need to do:

https://github.com/jaydenseric/graphql-upload/issues/305#issuecomment-1135285811