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
[BUG] Cannot read property 'req' of undefined when using serveStatic function #58
Comments
@futurelucas4502 can you try and confirm you still have an issue after using a deno run --allow-net --allow-env --allow-read=./ --reload ./entrypoint.ts If that fails, can you also see if you have an issue running with the following repo: https://github.com/asos-craigmorten/opine-template. This should be the repository created when following the tutorial. Let me know how get on? Edit: Just seen you've posted a repo for reproduction - will give that a go and see if happens for me 🤞 Slightly lost atm as I can't reproduce, but someone else has also had this issue now... This is my setup:
on MacOS Mojave (10.14.6), so it could be OS related, but hard to be sure just yet! |
@asos-craigmorten Using reload on my code is this screenshot: It is certainly an interesting issue because the stylesheets load correctly but we still get an error about the request also if i purposely make a 404 error the page completely loads with details about the 404 error: |
So after doing some more research it works completely fine on both Linux and MacOS therefore this seems to be an OS specific issue that only occurs on windows @asos-craigmorten |
@futurelucas4502 great work confirming! I suspect there may be some path manipulation logic that needs fixing somewhere, that is generally the cause of cross-OS issues |
Closed automatically with the linked PR #59 @futurelucas4502 can you confirm whether |
Ok, I'm able to reproduce under different means on MacOS using the |
@futurelucas4502 can you confirm whether |
hi @asos-craigmorten thanks for all your work I can confirm opine@0.21.2 fixes the problem and opine now works on windows properly! |
That’s awesome to hear! 🍾 please raise further issues if find anything else isn’t quite right 😄 |
Issue
Setup:
After following the tutorial for using Opine with dejs here I get an issue where when I try and load the site it gives an error
Not sure if this is relevant but I'm running Windows 10 2004 x64
Details
I installed deno using the following command in powershell:
iwr https://deno.land/x/install/install.ps1 -useb | iex
I then followed the tutorial writing out all the code and went to run it using
deno run --allow-net --allow-env --allow-read=./ ./entrypoint.ts
however if I then try and load the page I get the following error displayed instead of my index page:Exact code used
https://github.com/futurelucas4502/Opine-dejs
The text was updated successfully, but these errors were encountered: