next.js 模块未找到:无法解析'favicon.ico'

bjg7j2ky  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(113)

我在使用Next.js,无法解决此问题。
我在他们的GitHub上没有发现任何开放的问题。

{
  "dependencies": {
    "@apollo/client": "^3.7.1",
    "@types/apollo-upload-client": "^17.0.2",
    "@types/node": "18.11.9",
    "@types/react": "18.0.25",
    "@types/react-dom": "18.0.9",
    "axios": "^1.1.3",
    "eslint": "8.27.0",
    "eslint-config-next": "13.0.4",
    "form-data": "^4.0.0",
    "graphql": "^16.6.0",
    "next": "13.0.4",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "styled-components": "^5.3.6",
    "typescript": "4.9.3"
  }
}

字符串

wz8daaqr

wz8daaqr1#

我有同样的问题,我确保我安装了两个

"apollo-upload-client": "^18.0.1",

"@types/apollo-upload-client": "^17.0.5",

字符串
另外,请确保您遵循npm中的要求
但真正对我有用的是替换添加到导入中的JavaScript AdLink.mjs,如下所示

import createUploadLink from "apollo-upload-client/createUploadLink.mjs";


然后创建客户端

const httpLink = createUploadLink({
  uri: "http://localhost:4000/graphql", // Replace with your GraphQL endpoint
});

相关问题