Skip to content

fix: add missing vite source aliases for transitive @pen/* workspace deps#2

Open
JayaKrishnaNamburu wants to merge 2 commits into
lemni:mainfrom
JayaKrishnaNamburu:main
Open

fix: add missing vite source aliases for transitive @pen/* workspace deps#2
JayaKrishnaNamburu wants to merge 2 commits into
lemni:mainfrom
JayaKrishnaNamburu:main

Conversation

@JayaKrishnaNamburu

@JayaKrishnaNamburu JayaKrishnaNamburu commented Jun 24, 2026

Copy link
Copy Markdown

pnpm dev fails because several @pen/* packages aliased to source in vite.config.ts import other local packages that aren't aliased, causing vite to look for a non-existent dist/. Added the four missing aliases for transitive workspace dependencies.

Post adding the missing alias paths, the local dev server is working fine. And able to see the UI at http://localhost:5174.

Reproduction

To reproduce the issue, run npm run clean. Which clears out all the existing node_modules and build files. And then do a fresh install and npm run dev. If the builds are already ran ones without this change, the dist persist from previous builds. So on clean install and dev builds seems to re-trigger the bug.

Comment thread playground/tsconfig.json
"@pen/markdown-serialization": ["../packages/shared/markdown-serialization/src/index.ts"],
"@pen/undo": ["../packages/extensions/undo/src/index.ts"],
"@pen/document-ops": ["../packages/extensions/document-ops/src/index.ts"],
"@pen/delta-stream": ["../packages/extensions/delta-stream/src/index.ts"]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, when the mappings are missing. The deps are being resolved using the symlinks from their respective dist folders as expected. As they are exposed via exports field.

But if the server is ran with a clean setup. There is no previous build runs and so the server is breaking. Then i noticed there are path mappings and added them. I am not sure, if path mappings / symlinks is followed currently. Let me know, i can revert these changes.

And next, the package @pen/ai is breaking because of some types issue in extension.ts file. Partially why the builds are failing and server is failing to start

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

Successfully merging this pull request may close these issues.

1 participant