framework
framework copied to clipboard
`env: node\r: No such file or directory` (.bin/maizzle CRLF)
- Maizzle Version: 3.7.3
- Node.js Version: 18.0.0 (and 16.15.0, npm 8.5.5)
It seems that node_modules/.bin/maizzle executable ends up in DOS mode.
Maizzle versions affected: @maizzle/cli:
- 1.5.1 (1.5.0 and 1.4.0 seem to work, did not test below that)
"@maizzle/framework": "4.0.2"
$ maizzle serve --bin ../../node_modules/@maizzle/framework/src
/usr/bin/env: ‘node\r’: No such file or directory
error Command failed with exit code 127.
some problem
Are you using yarn by any chance? Line endings are automatically handled by npm, but not by yarn.
Might also be related to how Git is set up on your end, both executables have LF line endings:
Framework: https://github.dev/maizzle/framework/blob/master/bin/maizzle CLI: https://github.dev/maizzle/cli/blob/master/bin/maizzle
Tested on a Mac with Maizzle 4.0.2, Node 16 and NPM 8 but I wasn't able to reproduce the issue.
Related #703
Yes, iam used yarn, how to fixed with yarn ?
I don't know if yarn can do this, but you can change the line endings with something like dos2unix-cli:
npm install -g dos2unix-cli
dos2unix path/to/the/maizzle/bin
Think it's how your Git is checking out those files, as you can see above they're both LF
in the repo. You could also check if autocrlf
is set to false
: git config core.autocrlf
.
CLI: https://github.dev/maizzle/cli/blob/master/bin/maizzle
dont lf, crlf install, but custom change and fixed.
node modules delete and yarn install some clie dont change lf.
If you look at the pictures, you will see that there is no lf. Look at the first picture.
"@maizzle/cli": "1.5.1"
-> change "@maizzle/cli": "1.5.0"
and fixed|
i think bug -> https://github.com/maizzle/cli/commit/6a5849b7585038a0c5f2247b0ab56e76778dc2a0
If you look at the pictures, you will see that there is no lf. Look at the first picture.
But that's on your machine locally, they're both LF in the repo. Again, might be something specific to how yarn installs packages and copies their files to disk, I'm not sure since I can't reproduce it 🤔