gpt4 book ai didi

javascript - 错误 : No "exports" main defined in graphql-upload/package. json

转载 作者:行者123 更新时间:2023-12-05 00:35:05 31 4
gpt4 key购买 nike

已经安装了graphql-upload,做import { graphqlUploadExpress } from 'graphql-upload';并得到这个错误:
错误:graphql-upload/package.json 中没有定义“exports”主要
依赖项:

"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",
节点版本:v16.10.0

最佳答案

我个人为忽略错误设置了一个 ts-ignore。

// @ts-ignore
import GraphQLUpload from 'graphql-upload/GraphQLUpload.js';
// @ts-ignore
import Upload from 'graphql-upload/Upload.js';
和这样的进口。我希望它可以帮助,即使它很脏!

关于javascript - 错误 : No "exports" main defined in graphql-upload/package. json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72361047/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com