0
我有一个脚本hello
它具有以下内容:节点的shell脚本没有这样的文件或目录
#!/usr/bin/env node
console.log('hello there!');
当我与./hello
运行它,我得到以下的输出:
$ ./hello
: No such file or directory
当我运行它node ./hello
,我得到以下输出:
$ ./hello
hello there!
这是在Ubuntu 16.04上。
我无法复制它。 (刚刚试过,工作过) – SPillai
你运行过chmod + x hello吗? – Will
@JamesMonger你应该添加,你尝试的操作系统。 –