Skip to content
Discussion options

You must be logged in to vote

Hi @nickw1!

When a similar error happens, you can use pnpm why with the package name of the missing dependency to check what is using the dependency that was not found, and mark that dependency as external. In this case, iron-session. You need to mark the highest-level dependency as external, as only these are resolvable directly for your application when using pnpm. You can also solve this by installing the missing dependency.

The modified vite.config.mjs that works:

import { defineConfig } from "vite";

export default defineConfig({
  // base: '/lilt/', // uncomment if you have a non-default base dir e.g. https://hikar.org/lilt
  port: 3002,
  resolve: { external: ["iron-session"] },
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nickw1
Comment options

Answer selected by nickw1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants