node 和 shebang:帮助通过命令行执行 [英] node and shebang : help executing via command line
本文介绍了node 和 shebang:帮助通过命令行执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的节点安装在:
/usr/local/bin/node
并且我添加了shebang:
and I've added the shebang:
#!/usr/local/bin/node
到文件顶部,并为我的节点应用程序文件授予权限 755,但是当我尝试运行时:
to the top of the file and given my node app file the permissions 755, but when I try to run:
<代码>>./我的应用程序
我老了:
-bash: ./my-app: 没有那个文件或目录
我做错了什么?
推荐答案
节点shebang是:
The node shebang is:
#!/usr/bin/env node
并非所有系统都将节点放置在同一位置,可能是您的位置不正确.这将找到它们.
Not all systems place node in the same location, its possible that you have the location incorrectly. This will find them all.
这篇关于node 和 shebang:帮助通过命令行执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文