Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
Erro when trying to execute cli program through shebang

I made a program which is successfully working as I run with node . But when I installed my work at the global module with npm i -g and tried to execute it with the shebang I specified I got an error:

C:\Users\user_name\AppData\Roaming\npm\project_name.ps1:24:7
Line |
  24 |      & "usr/bin/env$exe" node "$basedir/node_modules/project_name …
     |        ~~~~~~~~~~~~~~~~~
     | The term 'usr/bin/env.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the
     | spelling of the name, or if a path was included, verify that the path is correct and try again.

I have tried delete the three files that are created and the module itself.

The first line in the index.js does have #!usr/bin/env node, my package.json also has "bin": {"alias_for_the_project":"index.js},

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda