fritx / markppt

一篇markdown,一份ppt。
https://www.npmjs.com/package/markppt
34 stars 6 forks source link

执行命令时报错 #7

Open swiftech opened 6 years ago

swiftech commented 6 years ago

执行报错

env: node\r: No such file or directory

Node: v6.11.0

fritx commented 6 years ago

@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.

有空就修复下~

swiftech commented 6 years ago

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

fritx commented 2 years ago

@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