-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elm-live dies hard when it cant find output files. #2305
Comments
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources. |
Just ran this example, (Attached) which is a lean version of my startup. To my surprise it actually works! |
Hello @thepowercare I am also running Windows 10 with WSL 2. I encounter similar issues with permissions some times. For me, what I ended up doing was adding this to my
I think the issue also happens depending if you did the git checkout into WSL, or if you are from WSL connecting to a windows path. For me I ended up doing the Then, in order to keep using my favorite windows Git client (Fork), I opened the repo at All in all, I don't think this issue is necessarily related to Elm or even to the community dev container, but more likely to how Windows and WSL interact in terms of file permissions. |
Hi Fabio
Thank's for the quick response 😄
I had a suspicion that something like this was the root course. But after deleting everything unsessesary for submitting the project to test, I ran the project again, as for the first time. This time the project worked. Smells like the inintial install just had "problems" setting the necessary permissions?!?
Should I close the issue?
Med venlig hilsen
Theodor Heiselberg
Systemudvikler
Adresse
Hjemmeside
Sønderhøj 16, DK-8260 Viby J
powercare.dk<http://www.powercare.dk/>
…________________________________
From: Fábio Beirão ***@***.***>
Sent: Monday, June 5, 2023 11:10 AM
To: elm/compiler ***@***.***>
Cc: Theodor Heiselberg ***@***.***>; Mention ***@***.***>
Subject: Re: [elm/compiler] Using elm-live from within devcontainer craches (Issue #2305)
Hello @thepowercare<https://github.com/thepowercare>
I am also running Windows 10 with WSL 2. I encounter similar issues with permissions some times.
For me, what I ended up doing was adding this to my devcontainer.json:
"postStartCommand": "rootDir=$PWD; cd .. && user=$(whoami); sudo chown $user -Rf $rootDir && mygroup=$(id -gn); sudo chgrp $mygroup -Rf $rootDir && cd $rootDir"
I think the issue also happens depending if you did the git checkout into WSL, or if you are from WSL connecting to a windows path.
For me I ended up doing the git clone inside WSL, to work around the permissions.
Then, in order to keep using my favorite windows Git client (Fork), I opened the repo at \\wsl.localhost\Ubuntu-22.04\home\...
All in all, I don't think this issue is necessarily related to Elm or even to the community dev container, but more likely to how Windows and WSL interact in terms of file permissions.
—
Reply to this email directly, view it on GitHub<#2305 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A6GQL7IMFAHCSLBXDWPIZJLXJWO6TANCNFSM6AAAAAAY2U5IYI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Solved by applying @fdbeirao suggestion :) |
If you no longer have the issue, then indeed closing would be the way to go. Indeed, permission issues will usually be associated to how you performed the initial git clone. Glad the problem is solved, have a great day further 🙂 |
Solution was short lived :( |
|
Quick Summary:
When using the community elm container. I'm getting a crash when opening localhost:8012
SSCCE
node ➜ /workspaces/elmish-dev-002 $ npm run watch
elm-live:
Server has been started! Server details below:
- Website URL: http://localhost:8012
- Serving files from: /workspaces/elmish-dev-002
Error parsing result: SyntaxError: Unexpected number in JSON at position 2
at JSON.parse ()
at ChildProcess. (/workspaces/elmish-dev-002/node_modules/elm-live/lib/src/build.js:110:33)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
{
build: {
action: 'error',
data: '\n' +
'-- ERROR -----------------------------------------------------------------------\n' +
'\n' +
'I ran into something that bypassed the normal error reporting process! I\n' +
'extracted whatever information I could from the internal error:\n' +
'\n' +
'> dist/index.js: openBinaryFile: permission denied (Permission denied)\n' +
'\n' +
'These errors are usually pretty confusing, so start by asking around on one of\n' +
'forums listed at https://elm-lang.org/community to see if anyone can get you\n' +
'unstuck quickly.\n' +
'\n' +
},
Additional Details
package.json
{
"name": "elmish-dev-002",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"watch": "elm-live src/Main.elm --port=8012 -- --debug --output=dist/index.js",
"compile": "elm make src/Main.elm --output=dist/index.js",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "Theodor",
"license": "ISC",
"devDependencies": {
"elm-live": "^4.0.2"
},
"dependencies": {
"elm-format": "^0.8.7"
}
}
The text was updated successfully, but these errors were encountered: