alextim / astro-lib

Makes it easy to add robots.txt, sitemap and web app manifest during build to your Astro app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERR_MODULE_NOT_FOUND'

jojojojojoj5564656465465 opened this issue · comments

pnpm run build --experimental-integrations
Debugger listening on ws://127.0.0.1:32835/cd9a281a-2926-4ceb-9980-5b7319f7b707
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

@example/basics@0.0.1 build /home/j/DEV/2706/pure/pure
astro build "--experimental-integrations"

Debugger listening on ws://127.0.0.1:38863/d96c94cd-8a6e-46c2-bce9-71c05dee7600
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
node:internal/errors:465
ErrorCaptureStackTrace(err);
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@astrojs/sitemap' imported from /home/j/DEV/2706/pure/pure/astro.config.mjs
at new NodeError (node:internal/errors:372:5)
at packageResolve (node:internal/modules/esm/resolve:954:9)
at moduleResolve (node:internal/modules/esm/resolve:1003:20)
at defaultResolve (node:internal/modules/esm/resolve:1218:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ModuleWrap. (node:internal/modules/esm/module_job:80:40)
at link (node:internal/modules/esm/module_job:78:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
 ELIFECYCLE  Command failed with exit code 1.

also your npx command doesn't generate

import robotsTxt from "astro-robots-txt";

import astro from "astro-robots-txt";

It generate a bug with the following of your instructions

i found as a pure beginner it's not import sitemap from "@astrojs/sitemap"; but its import sitemap from 'astro-sitemap';