Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

940
Views
Intentando ejecutar "npx typescript --init" "npm ERR! No se pudo determinar el ejecutable para ejecutar"

¿Qué significa el error npm ERR! could not determine executable to run significa?

Estoy tratando de inicializar una aplicación nodejs simple con mecanografiado e hilo. Realmente nunca he usado hilo antes.

Ejecuté los comandos: yarn init , que crea con éxito un package.json npx typescript --init Me da el mensaje de error anterior.

Versiones: hilo v1.22.11 npx 7.12.0

Ejecuté yarn add typescript y me da:

 info Direct dependencies └─ typescript@4.3.5 info All dependencies └─ typescript@4.3.5

Pero cuando intento typescript -v obtengo typescript: command not found

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

La solución fue usar el comando npx tsc --init .

No sé por qué el tutorial que estaba siguiendo usaba npx typescript --init , pero funcionó para ellos y no para mí.

over 4 years ago · Santiago Trujillo Report

0

Ampliando la respuesta de JimmyTheCode , funciona porque tsc es un paquete ficticio que solo instala mecanografiado.

La forma correcta de resolver esto sin instalar otro paquete más es usando la opción -p|--package en npx . Esta bandera es útil cuando se llama a un binario específico desde un paquete.

 npx --package typescript tsc --init # OR npx -p typescript tsc --init

Puede obtener más información en la documentación de npx .

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!