Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Fails on import of "SeoToolsContextValue" #65

Closed
pm0u opened this issue Feb 16, 2023 · 1 comment
Closed

Build Fails on import of "SeoToolsContextValue" #65

pm0u opened this issue Feb 16, 2023 · 1 comment

Comments

@pm0u
Copy link

pm0u commented Feb 16, 2023

$ sanity dev
✔ Checking configuration files...
Sanity Studio using vite@4.0.4 ready in 583ms and running at http://localhost:3333/
✘ [ERROR] No matching export in "../../node_modules/sanity-plugin-seo-tools/lib/esm/context/index.js" for import "SeoToolsContextValue"

    ../../node_modules/sanity-plugin-seo-tools/lib/esm/index.js:2:26:
      2 │ export { SeoToolsContext, SeoToolsContextValue } from "./context";
        ╵                           ~~~~~~~~~~~~~~~~~~~~

10:07:04 AM [vite] error while updating dependencies:
Error: Build failed with 1 error:
../../node_modules/sanity-plugin-seo-tools/lib/esm/index.js:2:26: ERROR: No matching export in "../../node_modules/sanity-plugin-seo-tools/lib/esm/context/index.js" for import "SeoToolsContextValue"
    at failureErrorWithLog (/Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:1604:15)
    at /Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:1056:28
    at runOnEndCallbacks (/Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:1476:61)
    at buildResponseToResult (/Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:1054:7)
    at /Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:1166:14
    at responseCallbacks.<computed> (/Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:701:9)
    at handleIncomingPacket (/Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:756:9)
    at Socket.readFromStdout (/Users/pmourer/Git/joinhandshake-headless-2.0/node_modules/esbuild/lib/main.js:677:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

project dependencies:

  "dependencies": {
    "@sanity/client": "^4.0.1",
    "@sanity/eslint-config-studio": "^2.0.1",
    "@sanity/studio-secrets": "^2.0.2",
    "@sanity/vision": "^3.4.0",
    "jose": "^4.11.4",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "sanity": "^3.4.0",
    "sanity-plugin-iframe-pane": "^2.1.1",
    "sanity-plugin-seo-tools": "^3.0.0",
    "styled-components": "^5.3.6"
  },
  "devDependencies": {
    "dotenv": "^16.0.3",
    "eslint": "^8.6.0",
    "eslint-config-prettier": "^8.5.0",
    "prettier": "^2.8.1",
    "typescript": "4.9.3"
  }

tsconfig:

{
"compilerOptions": {
  "target": "es2017",
  "lib": ["dom", "dom.iterable", "esnext"],
  "allowJs": true,
  "skipLibCheck": true,
  "strict": true,
  "forceConsistentCasingInFileNames": true,
  "noEmit": true,
  "esModuleInterop": true,
  "module": "esnext",
  "moduleResolution": "node",
  "resolveJsonModule": true,
  "isolatedModules": true,
  "jsx": "preserve",
  "incremental": true,
  "types": ["vite/client"]
},
"include": [
  "**/*.ts",
  "**/*.tsx",
],
"exclude": ["node_modules"]
}

confirmed on node 18.12 and 16.19
This is in a yarn workspace, that's why node modules is referencing a dependency up a couple folders. This is the correct install location.

@LiamMartens
Copy link
Owner

@pm0u this was caused by a type export - this should now be fixed after changing the export to export { type }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants