Skip to content

🐞 [BUG REPORT] ~ Issue with npx lingo.dev command is not working on Windows 11 #1521

@arafat-alim-office

Description

@arafat-alim-office

Description:
I'm experiencing the same issue mentioned in #952. When running npx lingo.dev init in PowerShell/GitBash on Windows 11, instead of executing properly, it opens the lingo.dev script file in an editor.

Environment:

  • OS: Windows 11
  • Node.js: v22.17.1
  • npm: 11.6.1
  • lingo.dev: 0.114.0
  • Terminal: PowerShell

Steps to Reproduce:

  1. Run npx lingo.dev init (or any other command: npx lingo.dev)
  2. Observe that it opens the script file instead of executing the command

Additional Context:
The command appears to be trying to execute the shell script at:
C:\Users\username\AppData\Local\npm-cache\_npx\118051d5371433ee\node_modules\.bin\lingo.dev

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*)
        if command -v cygpath > /dev/null 2>&1; then
            basedir=`cygpath -w "$basedir"`
        fi
    ;;
esac

if [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/../lingo.dev/bin/cli.mjs" "$@"
else 
  exec node  "$basedir/../lingo.dev/bin/cli.mjs" "$@"
fi

This seems to be a path or execution issue specific to Windows environments. Any help resolving this would be appreciated!


Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions