Closed PedroHLC closed 2 years ago
I also encountered this problem running elm-optimize-level-2
with yarn
. Editing the executable and creating new line endings fixed it.
@mdgriffith any intention to republish it?
The issue seems to be due to the line ending of the file CRLF
instead of LF
. A quick fix until it gets updated would be to use the package crlf
and use it in a post install:
"scripts": {
"postinstall": "crlf --set=LF node_modules/elm-optimize-level-2/bin/elm-optimize-level-2.js"
},
Are you publishing from Windows or Mac @mdgriffith?
Looks like if it's republished from Mac, we won't encounter this issue. If you're publishing from Windows we might have to find another solution.
Edit: We could enforce LF line endings w/ .gitattributes. See here.
Ah, I probably published from my Windows comp last time because that's where I was benchmarking from.
I'll publish from my mac this time!
Ok, new version published! This should be resolved. Ping me here if it isn't!
Hi, we're using elm-optimize-level-2 successfully in at least three projects, so firstly, I would like to thank you!
Today I was bumping them from 0.1.5 to 0.2.3, and our CIs broke with:
Simply editing
node_modules/elm-optimize-level-2/bin/elm-optimize-level-2.js
with vim seems to fix it.But your file on master seems to be just fine and correct. The problem is specific to the one deployed in npmjs.