evershop icon indicating copy to clipboard operation
evershop copied to clipboard

[BUG] Cannot run scripts on Mac

Open malixswoop opened this issue 1 year ago • 6 comments

Describe the bug Running a script (e.g. yarn dev) on Mac results in an error

To Reproduce Steps to reproduce the behavior:

  1. Install on Mac with Node 18
  2. run yarn dev
  3. See error

Expected behavior No error and bin/{command}/index.js should run

Screenshots image

Background (please complete the following information):

  • NodeJS Version: 18
  • Postgres Version: N/A
  • EverShop Version: 1.0.0
  • OS: Mac 14.1
  • Browser N/A

Additional context NODE_ENV=development node node_modules/@evershop/evershop/bin/dev/index.js works just fine

malixswoop avatar Jan 25 '24 16:01 malixswoop

Hi @malixswoop ,

Have you added the script to your packages.json?

treoden avatar Jan 26 '24 03:01 treoden

Yes. Happens on yarn dev... I suspect a windows vs mac thing 🤔

malixsys avatar Jan 26 '24 03:01 malixsys

Can you share your packages.json file here @malixsys , @malixswoop

treoden avatar Jan 26 '24 06:01 treoden

problem is probably this, which happens when I try to add those files to another git repo


warning: in the working copy of 'test_es/.evershop/build/admin/adminLogoutJson/server/entry.jsx', CRLF will be replaced by LF the next time Git touches it

maybe add a .gitattributes to make it LF on github ?

https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/#a-simple-gitattributes-config

malixsys avatar Jan 26 '24 18:01 malixsys

@malixswoop Have you tried using npm and not yarn?

chennighan avatar Feb 25 '24 16:02 chennighan

@malixswoop Have you tried using npm and not yarn?

@chennighan I will try if I come back to it.

malixswoop avatar Mar 02 '24 16:03 malixswoop