Skip to content

Windows: module not found error when running CLI after WSL setup #10

@theDakshJaitly

Description

@theDakshJaitly

Problem

Users on Windows who run setup.sh via WSL and then try to run node .mex/dist/cli.js check from a native Windows terminal get a module not found error.

Steps to reproduce

  1. Clone mex on a Windows machine
  2. Run setup.sh via WSL
  3. Run node .mex/dist/cli.js check from the project root (outside WSL)

What happens

Error: Cannot find module '...'

Why

The CLI gets built inside WSL but node_modules and path resolution break when the build environment and runtime environment don't match. Mixing Windows filesystem access with WSL tooling causes symlink and path separator issues in node_modules.

Workaround

Run everything inside WSL, don't mix environments:

cd .mex
npm install
npm run build
cd ..
node .mex/dist/cli.js check

What needs to be fixed

  • Add a prominent Windows callout in the README near the install section: "Windows users: run all commands inside WSL or Git Bash. Do not mix environments."
  • Investigate a native Windows setup path (either a setup.ps1 PowerShell script or making the WSL flow work end to end without manual rebuilds)
  • Test CLI commands natively on Windows with Node without WSL

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions