You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess that Michael develops Vendure on Windows and I’ve noticed lines in some files in git repository end with \r\n (instead of \n). For example on MacOS:
$ git clone https://github.com/vendure-ecommerce/vendure
$ file vendure/scripts/check-imports.ts
vendure/scripts/check-imports.ts: ASCII text, with CRLF line terminators
$ file vendure/packages/core/src/entity/register-custom-entity-fields.ts
vendure/packages/core/src/entity/register-custom-entity-fields.ts: ASCII text, with CRLF line terminators
The text was updated successfully, but these errors were encountered:
When installing from the npm registry, all the .js and .dts files generated by TypeScript will have LF line endings. This is because it is configured this way in the tsconfig.json file: "newLine": "LF". All good.
However, the @vendure/create/index.js file which is executed when installing via @vendure/create is not transpiled by TypeScript, and thus retains the CRLF line endings from the Windows platform I wrote it on.
Somehow the npm client can deal with this, whereas yarn cannot.
The solution is to use a .gitattributes file to ensure these particular files are always kept with LF newlines.
Describe the bug
(Reported by Nathan via Slack)
Just ran
yarn create @vendure my-app
and got the following error:Yarn 1.17.3, node v10.15.2, Ubuntu 18.04.3 LTS
running npx @vendure/create my-app works as expected
Follow-up from David:
Nathan seems like line endings problem:
https://stackoverflow.com/questions/30344858/
I guess that Michael develops Vendure on Windows and I’ve noticed lines in some files in git repository end with \r\n (instead of \n). For example on MacOS:
The text was updated successfully, but these errors were encountered: