#Error when importing package: "Package subpath './zod' is not defined by 'exports' in astro/package.

8 messages · Page 1 of 1 (latest)

feral granite
#

Hello everyone,

I am encountering an error while trying to import the '<@&1055234544183287879>/rss' package in my project. The error message says: "Package subpath './zod' is not defined by "exports" in E:\p\node_modules\astro\package.json imported from E:\p\node_modules@astrojs\rss\dist\index.js"

After some research, I found out that this error occurs because of an issue with the way the dependencies are defined in their respective package.json files.

I have tried reinstalling both packages, checking for version compatibility issues, and deleting the node_modules directory, but the issue persists.

Has anyone else encountered a similar issue and found a solution? Any help would be greatly appreciated.

Thank you.

long cragBOT
#
Still waiting for an answer?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

teal basin
#

@feral granite is there"./zod" in "exports" in your /node_modules/astro/package.json?

feral granite
teal basin
#

it should look like this

    "./zod": {
      "types": "./zod.d.ts",
      "default": "./zod.mjs"
    }
feral granite
#

No, the "exports" section does not have a reference to "./zod"

  "exports": {
    ".": {
      "types": "./dist/@types/astro.d.ts",
      "default": "./astro.js"
    },
    "./env": "./env.d.ts",
    "./types": "./types.d.ts",
    "./client": "./client.d.ts",
    "./client-base": "./client-base.d.ts",
    "./import-meta": "./import-meta.d.ts",
    "./astro-jsx": "./astro-jsx.d.ts",
    "./tsconfigs/*.json": "./tsconfigs/*",
    "./tsconfigs/*": "./tsconfigs/*.json",
    "./jsx/*": "./dist/jsx/*",
    "./jsx-runtime": "./dist/jsx-runtime/index.js",
    "./config": {
      "types": "./config.d.ts",
      "default": "./config.mjs"
    },
    "./app": "./dist/core/app/index.js",
    "./app/node": "./dist/core/app/node.js",
    "./client/*": "./dist/runtime/client/*",
    "./components": "./components/index.ts",
    "./components/*": "./components/*",
    "./debug": "./components/Debug.astro",
    "./internal/*": "./dist/runtime/server/*",
    "./package.json": "./package.json",
    "./runtime/*": "./dist/runtime/*",
    "./server/*": "./dist/runtime/server/*",
    "./vite-plugin-astro": "./dist/vite-plugin-astro/index.js",
    "./vite-plugin-astro/*": "./dist/vite-plugin-astro/*",
    "./vite-plugin-astro-postprocess": "./dist/vite-plugin-astro-postprocess/index.js",
    "./vite-plugin-astro-postprocess/*": "./dist/vite-plugin-astro-postprocess/*",
    "./vite-plugin-jsx/*": "./dist/vite-plugin-jsx/*",
    "./vite-plugin-jsx": "./dist/vite-plugin-jsx/index.js",
    "./vite-plugin-markdown-legacy": "./dist/vite-plugin-markdown-legacy/index.js",
    "./vite-plugin-markdown-legacy/*": "./dist/vite-plugin-markdown-legacy/*",
    "./vite-plugin-markdown": "./dist/vite-plugin-markdown/index.js",
    "./vite-plugin-markdown/*": "./dist/vite-plugin-markdown/*",
    "./dist/jsx/*": "./dist/jsx/*"
  },
teal basin