1

我有一个我一直在处理的 sveltekit 项目,并在不久前使用 @urql/exchange-graphcache 配置了图形缓存。但是我刚刚安装了一个新的依赖项(dayjs,虽然我认为它无关紧要),现在它抛出了错误:

Failed to resolve import "@urql/exchange-graphcache" from "src/routes/$layout.svelte". Does the file exist?

当我在安装 dayjs 之前回滚并安装新的 yarn 时,我得到了同样的错误。我尝试浏览graphcache 错误页面,但没有找到任何帮助。任何人都可以帮助解决可能的错误吗?

如果有帮助,这些是我的依赖项

    "dependencies": {
        "@urql/svelte": "^1.2.0",
        "dayjs": "^1.10.4"
    },
    "devDependencies": {
        "@graphql-codegen/cli": "^1.21.3",
        "@graphql-codegen/typed-document-node": "^1.18.4",
        "@graphql-codegen/typescript": "^1.21.1",
        "@graphql-codegen/typescript-operations": "^1.17.15",
        "@graphql-typed-document-node/core": "^3.1.0",
        "@sveltejs/adapter-node": "next",
        "@sveltejs/kit": "next",
        "graphql": "^15.5.0",
        "svelte": "^3.29.0",
        "svelte-preprocess": "^4.0.0",
        "tslib": "^2.0.0",
        "typescript": "^4.0.0",
        "vite": "^2.1.0"
    }
4

0 回答 0