Node script executable not working on Mac : env: node\r: No such file or directory

前端 未结 6 1143
清酒与你
清酒与你 2021-01-31 19:10

I have created my node script executable to execute some tasks grunt. On Windows, my node script works fine. But on Mac OS X (Yosemite), it\'s not working.

My node scri

6条回答
  •  有刺的猬
    2021-01-31 19:45

    This should no longer be a problem since npm@^5.4.0. npm will now auto-convert to the correct line endings. See https://github.com/npm/npm/issues/12371.

    This is, however, still an issue in yarn: https://github.com/yarnpkg/yarn/issues/5480.

    If you've come to this page because you've encountered this error when using yarn instead of npm, like I did, you might want to consider using npm instead of yarn. npm has most of yarn's best features these days, anyway (arguably).

提交回复
热议问题