Daydreamer-riri / vite-react-ssg

Static-site generation for React on Vite.
https://vite-react-ssg.netlify.app/
MIT License
125 stars 6 forks source link

Error "env: node\r: No such file or directory" on Linux/Mac #22

Closed cthulberg closed 3 months ago

cthulberg commented 4 months ago

I'm writing to express my sincere gratitude for creating this awesome library. However, I've come across an issue when using it on Linux/Mac systems.

Steps to Reproduce:

  1. Create a new project.
  2. Run bun add --dev vite-react-ssg to install the package.
  3. Run bun run staticdev to build the project.

The following error occurs:

env: node\r: No such file or directory
error: script "staticbuild" exited with code 127

Workaround:

I found a temporary workaround by running the following command before bun run staticdev:

find ./node_modules/vite-react-ssg/ -type f -exec dos2unix {} \\; This seems to fix the issue, but it's not an ideal solution.

I tried with npm and yarn and got the same error without the workaround.

Daydreamer-riri commented 4 months ago

Hi @cthulberg , Can you provide the version of vite-react-ssg you are using? I'm not able to reproduce the issue you mentioned using Linux or WSL on my end.

Daydreamer-riri commented 4 months ago

It may possibly have something to do with the fact that I am posting the latest version on windows. I have released 0.6.4, can you help me to try if this version works?

cthulberg commented 3 months ago

I was using "vite-react-ssg": "^0.7.0-beta.1" Everything looks good on "vite-react-ssg": "^0.6.4"

Thank you!

Daydreamer-riri commented 3 months ago

I was using "vite-react-ssg": "^0.7.0-beta.1"

I've also released 0.7.0-beta.2 for version 0.7.0, which can also be used if there is a need for new features (this version supports server-only loaders).