Help with first steps #538
Copy link
Copy link
Open
Description
Hi.
Sharplab has been really useful to me and I'd like to extend its functionality. Although, I'm having some issues getting started with local development.
I read the instructions and executed sl setup. It successfully builds everything. However, when I run Server and try to locally connect, I get 404 on my browser.
sl setupoutputsServer -> D:\dev\sharplab-vanilla\source\Server\bin\Debug\netcoreapp3.1\publish\- From my cmd I do
D:\dev\sharplab-vanilla\source\Server\bin\Debug\netcoreapp3.1\SharpLab.Server.exewhich outputs:
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: D:\dev\sharplab-vanilla
- I connect from my browser to: http://localhost:5000, https://localhost:5001 and http://localhost:49891/. Everytime I try, I get 404. The first URL outputs in the Server.exe console:
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://localhost:5000/
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 24.7209ms 404
Alternatively, I also run Server with IIS Express from Visual Studio (green play button). The browser pops up and I get 404.
I'm pretty sure I must be forgetting something stupid. The truth is that it is my very first time regarding C# web development.
I work on a three address code representation of CIL bytecode. I'd really like to integrate it into your website!
Best,
Manuel.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
ashmind commentedon Jul 20, 2020
Thanks for the detailed report!
Yep, setup is a bit broken at the moment, I'm looking to improve it.
I think one of the main problems is that you are running Server, but without WebApp it will have no UI.
I recommend installing https://github.com/dotnet/tye and running
dotnet tye runin the main folder.If that is successful, you should have both frontend and backend built and running.
I am going to look into improving setup as part of #488, however can't promise any specific timeline.
ashmind commentedon Jul 20, 2020
I just fixed
sl setupwhich will install correct version oftyefor you.m-carrasco commentedon Jul 20, 2020
Awesome! \0/
As soon as I can, I'll try to test it and tell you if it is working.
m-carrasco commentedon Jul 21, 2020
@ashmind I had the chance to test your latest commit. I deleted the old repo and cloned it again.
I ran
sl setupand it built. Then, I executeddotnet tye runyielding the following error.In case you need more information, please tell me. I didn't find any log error.
Thanks for your support!
m-carrasco commentedon Jul 21, 2020
Here goes more info.
I can access the Tye Dashboard (http://localhost:8000/). There are two services listed:
webapp-assets's log is:
webapp-dotnet's log is:
Accessing http://localhost:54100/ returns 404.
Not sure if it is relevant but npm seems to be installed and available through my cmd.
ashmind commentedon Aug 8, 2020
Interesting. Do you have
pwshon PATH?m-carrasco commentedon Aug 16, 2020
Sorry for the long pause @ashmind
After a Windows update my laptop was not working anymore. So I had to re install Windows on it. I lost the original working environment. However, I tried again from a fresh install.
I'm still not able to run it, although here are some issues I faced and how I solved them. All this happened while running sl setup and dotnet run tye from a cmd.
I solved it by running a Powershell instance and executing: Set-ExecutionPolicy Unrestricted (I know this is not the best way to do it probably - security wise).
Then I had:
I solved it by installing NodeJS LTS from its official website. The strange thing is that when I installed VS I had choosen to install NodeJS stuff.
Lastly, I had an issue where I didn't have pwsh available on the cmd. I solved it by running dotnet tool install -g powershell.
After
sl setupexecutes I rundotnet tye runbut the browser loads a blank page.Similarly happens if I run it through Visual Studio.
ashmind commentedon Aug 17, 2020
Thanks for the thorough approach! What do you see if you manually run
npm run buildundersource\WebApp\?m-carrasco commentedon Aug 17, 2020
Thanks @ashmind
Hmm... I think I have another missing dependency! Am I missing TypeScript or something like it?
m-carrasco commentedon Aug 17, 2020
Here you have the log
ashmind commentedon Aug 17, 2020
Thanks! I can reproduce it in node
12.18.3(but not in the older version of node I had before).I'll investigate and get back to you (can't promise any specific time yet).
m-carrasco commentedon Aug 17, 2020
No worries. Take your time.
ashmind commentedon Aug 17, 2020
Please try branch edge, added a potential fix there (don't remember if it has any other implications, so not in main branch yet).
m-carrasco commentedon Aug 17, 2020
EDIT: Ignore this post, I made a mistake while testing.
I checked out branch edge.
Then, I tried sl setup and still I only get a blank page.
Lastly, I tried npm run build in WebApp and I got the same error as before.
m-carrasco commentedon Aug 17, 2020
Arghhh. Forget my last update, I did something wrong. On edge, npm run build works! \0/
1 remaining item
ashmind commentedon Aug 18, 2020
Glad to hear it works! (even if the flow is awkward for now).
I'll investigate
sl setup && dotnet tye runissue further (when I have some time).m-carrasco commentedon Jan 3, 2021
@ashmind How are you? I hope you are doing great.
I found some time to resume my work with Sharplab. I started again by running
sl setup(on a fresh repository) and I'm having the following error. This happens in main and edge branches.Command:
sl setupm-carrasco commentedon Jan 3, 2021
@ashmind I think I got it:
Based on changes done here: 38e8412
ashmind commentedon Jan 3, 2021
Yep that's very unlucky timing, it was OK for a while, but I literally just broke it yesterday and was going to revisit it (need to make sure
dotnet tye runactually works as well).kkokosa commentedon Mar 30, 2021
Hm.. any updates on this? Fresh repository gives the same error while
sl setup. I could help but it seems pretty deep change made here...👀[gh-538] Fix local setup and run issues
ashmind commentedon Mar 31, 2021
Sure -- applied a fix, please give it a try.
kkokosa commentedon May 21, 2021
Yes, it helped @ashmind, thank you! Issue may be closed.
joelpryde commentedon May 28, 2021
I seem to still be getting this on main branch:
pwsh is in my path and I have run
sl setupandnpm run buildsuccessfully.kkokosa commentedon May 28, 2021
Are you able to execute:
pwsh -Command "npm run start"insource/WebApp? Beacause this is what Tye is trying to execute here.joelpryde commentedon May 28, 2021
I am not unfortunately:
Strangely doing a
git cleanand re-runningsl setupdid let me runpwsh -Command "npm run start"ok(or at least, I can get to the following:
but I still get the same
System.ComponentModel.Win32Exceptionerror onsl run(diffed the error/callstack to make sure).ashmind commentedon Jun 20, 2021
Hmm -- looking at the code it would seem like you are missing
source/WebApp/components/internal/codemirror/mode-asm-instructions.txtfor some reason. I'll have to add more logging to this. (might take a bit of time given current priorities)Meir017 commentedon Jun 2, 2025
Try #1365