node.js node 和 shebang:帮助通过命令行执行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24253027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
node and shebang : help executing via command line
提问by asking
My node installation is at:
我的节点安装在:
/usr/local/bin/node
/usr/local/bin/node
and I've added the shebang:
我添加了shebang:
#!/usr/local/bin/node
#!/usr/local/bin/node
to the top of the file and given my node app file the permissions 755, but when I try to run:
到文件顶部,并为我的节点应用程序文件授予权限 755,但是当我尝试运行时:
> ./my-app
> ./my-app
I get the old:
我得到旧的:
-bash: ./my-app: No such file or directory
-bash: ./my-app: No such file or directory
What am I doing wrong?
我究竟做错了什么?

