markppt icon indicating copy to clipboard operation
markppt copied to clipboard

执行命令时报错

Open swiftech opened this issue 7 years ago • 3 comments

执行报错

env: node\r: No such file or directory

Node: v6.11.0

swiftech avatar Mar 05 '18 02:03 swiftech

@swiftech hi 感觉和我之前的一个库问题相似 https://github.com/fritx/dwn/issues/1

When using the cli on Ubuntu, I get

$ node_modules/.bin/dwn my_address
/usr/bin/env: "node\r": No such file or directory

There seems to be an issue with line endings in this package.

有空就修复下~

fritx avatar Mar 05 '18 04:03 fritx

忘记说了,我的系统是Mac OS 10.12.6,可能跟系统也有关系

swiftech avatar Mar 07 '18 00:03 swiftech

@swiftech 抱歉,多年之后才解决~ 当年使用windows操作系统,发的npm包带有\r\n导致在unix系统可能出现这个错误

已在项目中加入prepublish即执行dos2unix确保替换到位,并发布了修正的新版本 v0.0.18

Node script executable not working on Mac : env: node\r: No such file or directory https://www.npmjs.com/package/dos2unix-cli

fritx avatar Aug 18 '22 05:08 fritx