Skip to content

fix: use npx to run lex build command for windows compat#2917

Open
luo2430 wants to merge 1 commit into
npmx-dev:mainfrom
luo2430:main
Open

fix: use npx to run lex build command for windows compat#2917
luo2430 wants to merge 1 commit into
npmx-dev:mainfrom
luo2430:main

Conversation

@luo2430

@luo2430 luo2430 commented Jun 15, 2026

Copy link
Copy Markdown

🔗 Linked issue

none

🧭 Context

Resolved an issue during pnpm install on Windows

│ $ lex build --lexicons lexicons --out shared/types/lexicons --clear ◉ cache hit, replaying
│ ---
│ vp run: cache hit, 419ms saved.
│ $ node scripts/generate-file-tree-sprite.ts ◉ cache hit, replaying
│ ---
│ vp run: cache hit, 193ms saved.
│  ERROR  [unhandledRejection] Error while importing module C:/Users/24306/git_learning/npmx-dev/modules/security-headers.…
│ Require stack:
│ - C:\Users\24306\git_learning\npmx-dev\shared\utils\constants.ts
│     at loadNuxtModuleInstance (/C:/Users/24306/git_learning/npmx-dev/node_modules/.pnpm/@nuxt+kit@4.4.5_magicast@0.5.2/n…
│  ERROR  [unhandledRejection] Error while importing module C:/Users/24306/git_learning/npmx-dev/modules/standard-site-syn…
│ Require stack:
│ - C:\Users\24306\git_learning\npmx-dev\shared\utils\constants.ts
│     at loadNuxtModuleInstance (/C:/Users/24306/git_learning/npmx-dev/node_modules/.pnpm/@nuxt+kit@4.4.5_magicast@0.5.2/n…
│  ERROR  [unhandledRejection] Error while importing module C:/Users/24306/git_learning/npmx-dev/modules/blog.ts: Error: C…
│ Require stack:
│ - C:\Users\24306\git_learning\npmx-dev\shared\utils\constants.ts
│     at loadNuxtModuleInstance (/C:/Users/24306/git_learning/npmx-dev/node_modules/.pnpm/@nuxt+kit@4.4.5_magicast@0.5.2/n…
│  ERROR  Error while importing module C:/Users/24306/git_learning/npmx-dev/modules/blog.ts: Error: Cannot find module '..…
│ Require stack:
│ - C:\Users\24306\git_learning\npmx-dev\shared\utils\constants.ts
│     at loadNuxtModuleInstance (/C:/Users/24306/git_learning/npmx-dev/node_modules/.pnpm/@nuxt+kit@4.4.5_magicast@0.5.2/n…
└─ Failed in 3.3s at C:\Users\24306\git_learning\npmx-dev
[ELIFECYCLE] Command failed with exit code 1.
[ERROR] Command failed with exit code 1: "C:\Program Files\nodejs\node.exe" "C:\Users\24306\AppData\Local\pnpm\store\v11\links\@\pnpm\11.1.1\609303f0ed14bcc46c877b61a14f10e5fc0e12baa6026268fd68c5a6e134d86c\node_modules\pnpm\bin\pnpm.mjs" install

📚 Description

Just add npx in front of lex build --lexicons lexicons --out shared/types/lexicons --clear in vite.config.ts

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Error Error Jun 15, 2026 12:42pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jun 15, 2026 12:42pm
npmx-lunaria Ignored Ignored Jun 15, 2026 12:42pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c06b9ff0-cd0d-4854-9887-55d1dcf73fa3

📥 Commits

Reviewing files that changed from the base of the PR and between 57318ba and e953850.

📒 Files selected for processing (1)
  • vite.config.ts
✅ Files skipped from review due to trivial changes (1)
  • vite.config.ts

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated build configuration to ensure the lexicon generation task uses the correct tool invocation method, improving build reliability and consistency.

Walkthrough

In vite.config.ts, the generate:lexicons task command is updated to invoke the lex CLI via npx lex build instead of lex build directly, with all other arguments (--lexicons lexicons, output path shared/types/lexicons, and --clear) remaining unchanged.

Changes

npx lex CLI invocation

Layer / File(s) Summary
generate:lexicons task command
vite.config.ts
The task command string for generate:lexicons is changed from lex build ... to npx lex build ..., altering how the lex binary is resolved at runtime whilst preserving all build arguments.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding npx to the lex build command for Windows compatibility.
Description check ✅ Passed The description is directly related to the changeset, providing context about the Windows compatibility issue and explaining why npx was added to the lex build command.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Hello! Thank you for opening your first PR to npmx, @luo2430! 🚀

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@luo2430 luo2430 changed the title fix(vite): use npx to run lex build command for windows compat fix: use npx to run lex build command for windows compat Jun 15, 2026
@MatteoGabriele

Copy link
Copy Markdown
Member

@luo2430, thank you for your contribution.
Why do you think there's a need for npx? As far as I know, the lex binary is added by the @atproto/lex package.

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.

2 participants