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.42k stars 131 forks source link

No "exports" main defined #353

Closed productdevbook closed 1 year ago

productdevbook commented 1 year ago

import { processRequest } from 'graphql-upload'


Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in 
/home/productdevbook/Documents/aa/server-micro-library/node_modules/graphql-upload/package.json
 imported from /home/productdevbook/Documents/aa/server-micro-library/src/index.ts
jaydenseric commented 1 year ago

This duplicates many past issues, please search them and you will be able to figure out what's going on pretty quick.

productdevbook commented 1 year ago

Thank you back

https://github.com/jaydenseric/graphql-upload/issues/337#issuecomment-1240038750

  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "require": "./dist/index.js",
      "import": "./dist/index.mjs"
    }
  },

I think you should make an index like this and export funcs from there. Because this is not a good use for some reason.