Build Failed Uncaught Error: No such module from package in node_modules directory

For Workes & Pages, what is the name of the domain?

gxp-copilot.pages.dev

What is the error message?

Error: Failed to publish your Function. Got error: Uncaught Error: No such module “@astrojs/lit/server.js”. imported from “renderers.mjs”

What is the issue or error you’re encountering

deploying astro SSR app, failed after publish assets.

What are the steps to reproduce the issue?

Always reproduce when build my app.

Is there way to resolve dependencies from node_modules?