knex: Executable node/r not found on Linux
Environment
Knex version: 2.4.1 Database + version: any OS: Ubuntu
Bug
-
Running knex on Linux fails pretty early with the same behavior of this bug: #4614 . If I manually change within node_modules/.bin/knex from CRLF to LF it runs smoothly.
-
Error message
/usr/bin/env: ‘node\r’: No such file or directory error Command failed with exit code 127.
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 13
- Comments: 19 (3 by maintainers)
Commits related to this issue
- update knex version to fix https://github.com/knex/knex/issues/5455 — committed to beenotung/quick-erd by beenotung a year ago
@ripecosta Thank you for the tip, added. @ldrick can you please check if 2.4.2 solves the issue for you?
will fix tonight, it’s a result of a different git configuration on my new computer 😕
I will review https://github.com/knex/knex/pull/5460, merge it and release a 2.5.1 as soon as possible.
When I download 2.4.2 this is resolved, but when I install 2.5.0 the issue returns and
bin/cli.jshas CRLF endings again.A different (temporary) fix until a new version is published:
package.jsonbefore:knex migrate:latestpackage.jsonafter:npx --yes crlf --set=LF node_modules/knex/bin/cli.js && knex migrate:latestthanks, need to reconfigure new rig
I will release a new version this evening.
Hello, I can confirm that knex 2.5.0 has the issue on MacOS (local) and Linux (CI/CD)
Running:
NODE_ENV=test y knex migrate:latestError:env: node\r: No such file or directoryNode: 18.15.0 Yarn: 1.22.19 Knex: 2.5.0