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你應該添加,你嘗試的操作系統。 –