Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

259
Vistas
Node Command Line Tool with NVM bash:not found

I am writing a simple node CLI tool and having trouble using with NVM. Even installed node locally and use nvm use system and the CLI file still cannot be found. Code is simply including the shell designation:

#!/usr/bin/env node

console.log("Hello, here is my first CLI tool")

When running this from command line I get this: -bash: cli-project: command not found

Have tried everything. Node is at /usr/local/bin/node, and have even added that. Have used system location of node. Have added the path to /etc/paths. Nothing works! Does anyone have experience building a node CLI tool using NVM how to set up initially? NVM is set up correctly on my machine, and .bash_profile is fine. Very puzzling why it won't pick up this simple path to this.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You have to do a little package.json magic in addition to the shebang it seems like so:

"bin": {
    "cli-project": "index.js"
  },

Then do npm link . in the application directory. Works!

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda