节点和shebang:帮助通过命令行执行 [英] node and shebang : help executing via command line
本文介绍了节点和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:
> ./my-app
我老了:
-bash: ./my-app: No such file or directory
我在做什么错了?
推荐答案
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.
这篇关于节点和shebang:帮助通过命令行执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文