'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},
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
