jsh: permission denied: vite
Describe the bug
Trying to run my GitHub repo that is based on Vite but I only get jsh: permission denied: vite when I try tun it
Url to repo: https://github.com/colorsofcode/pong-typescript-game-development
Link to the blitz that caused the error
https://stackblitz.com/~/github.com/colorsofcode/pong-typescript-game-development
Steps to reproduce
- Go to https://stackblitz.com/~/github.com/colorsofcode/pong-typescript-game-development
- wait for the error in the terminal
Expected behavior
the site to run
Parity with Local
- [X] I have run the project in my local machine and I could not reproduce the issue.
Screenshots
Platform
Version = 1.67.0
Hash = 69b9b1602da27b7f44e9800c223182ce1a037ea8
WebContainer = 3c06ff333fff62d153837b0d0df85b8ed07b008f
Browser name = Chrome
Full version = 106.0.0.0
Major version = 106
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 109181229,
"usedJSHeapSize": 79971261,
"jsHeapSizeLimit": 2172649472
}
Additional context
No response
Hi @colorsofcode. Thanks for reaching out!
The problem here is that it looks like the node_modules directory was directly committed to your project https://github.com/colorsofcode/pong-typescript-game-development/tree/main/node_modules. This messes with the binaries that are located in node_modules/.bin as I think this was committed from a Windows operating system? This means that it will not work on macOS or Linux machines.
For instance, on macOS you will get the exact same error.

If you remove node_modules and run npm install again, it will work. So make sure node_modules are excluded from git and you should be fine.
Something additional to note. After doing the above, the project doesn't work yet. The reason is that Windows filenames are case-insensitive. Which means that importing foo.ts is identical as importing Foo.ts. This is not the case on unix systems, where files are case-sensitive.
So after bootting, you will see the following error message.

The reason is that some files in the core directory start with an uppercase. This means that the import ./core/input should be ./core/Input instead. So either make sure the imports are correct, or rename the files in core to be lowercase instead (which is easier).
After doing all of that, your project works (and it will also work for everyone cloning the repository on a unix system).

Didn't notice that those issues hadn't been updated properly on GitHub. Thank you kindly for your time, Sam. 🥳