Comments (17)
@OvermindDL1 As the message guide, I tried to run phx.server as Administrator
, and found the priv
folder in _build
now is a symbol link, and seems no problems.
from phoenix_live_reload.
Maybe you can take a try, the project ispublic, here the repository: honeycomb-adventure .
And here my environment:
Windows 10 Version 1703, Enterprise edition.
Hoped this information can make some help.
from phoenix_live_reload.
Thank you @zhengxiaoyao0716! It seems this issue is specific to Windows. Since we can't properly use symlinks on Windows, we need to copy the files and something is happening when we copy them.
Pinging @OvermindDL1 in case he has any ideas what may be happening.
from phoenix_live_reload.
Well, I'm glad that I could help you. Since this problem may caused by symlinks
and only happened on Windows, I'll try to working on other system for the moment.
from phoenix_live_reload.
This is precisely the problem. If you enable symlinks for your user in windows (or run phoenix as administrator) then it works fine. I did a lot of research on that when I had the issue last year, it's documented around here somewhere, but that is the way to solve it on Windows... ^.^;
The issue is that Windows doesn't quite flush and unlock the file and phoenix is too fast to acquire the new files, this becomes especially larger of a problem if you use any virus program at all as their file listen hook slows down file access as well since Windows does not have a well made COW or well-journaled file system.
from phoenix_live_reload.
I thought a message was added at load time that warned you exactly of this and how to fix it as well, wasn't it?
from phoenix_live_reload.
The issue is that... phoenix is too fast ...
:D In all seriousness I don't think we can help this one on our end, but maybe we can include docs somewhere for windows to recommend running as admin?
from phoenix_live_reload.
:D In all seriousness I don't think we can help this one on our end
Lol, more that the beam is too fast because it does not listen for the windows event that says a flush is complete, and even then if an anti-virus exists then it will lock the file before it could be re-opened anyway, thus still causing the same issue... ^.^;
but maybe we can include docs somewhere for windows to recommend running as admin?
I thought it was already documented when a person loads a phoenix server in dev mode on windows, it should print a good sized paragraph talking about exactly this issue and what to do to work around it. I know I last saw it when I last ran the server on windows (thankfully I finally convinced my job to migrate the servers fully to linux, red hat but eh).
from phoenix_live_reload.
Ah, yes indeed it is still there:
And:
from phoenix_live_reload.
ah, beautiful. Thanks!
from phoenix_live_reload.
@OvermindDL1 Thanks, I found the message, it is just in the third screenshots of the first floor, but I didn't realize it at first that this was the reason of this problem.
from phoenix_live_reload.
I have a small idea, the only thing we need is to create some symbol links as Administrator
identity for those folders, but we don't need to create them each times at the phx.server
task.
We can provide another task to allow user create those symlinks as Administrator
identity, then each time that phx.server
start, check those symlinks and if they are not exist, give a tip to users that they need manual execute the task as Administrator
to generate those symlinks.
Although this way may not the best method and user have to take an extra step, I think this is the most simple patch,.
from phoenix_live_reload.
Umm, perhaps we have a easier choise, just change the message like you need to run this task as Administrator at least once time
, if user did this and the symbol links already exist, hide the message.
from phoenix_live_reload.
if user did this and the symbol links already exist, hide the message.
Hmm, a check to see if the symlink already exists and points to the correct location might indeed be a good quality-of-life workaround, and only be a line or two of code to implement (if the BEAM has a command to query that information, I'm not actually sure, never used it...). You should PR it? :-)
from phoenix_live_reload.
it is just in the third screenshots of the first floor, but I didn't realize it at first that this was the reason of this problem.
Also, heh, it is, I missed it too. I could have sworn it was red when I had it back on Windows.
from phoenix_live_reload.
@OvermindDL1 That is my PR , I tested those code on my windows system locally and they works well, but maybe we need more test on other systems.
In addition, I tried some terminals I can found on my Win10, powershell, cmd, mingw. But none of them can render color with [warn] logger. In my VSCode debug console, the message starts with warning
is red, but [warn] logs still can't.
from phoenix_live_reload.
In addition, I tried some terminals I can found on my Win10, powershell, cmd, mingw. But none of them can render color with [warn] logger. In my VSCode debug console, the message starts with warning is red, but [warn] logs still can't.
For note, none of what you listed are terminals but rather are shells. The terminal you were probably using was 'command' (which is pretty horrible, and even Win10 is trying to phase it out). I tend to use conemu as the terminal myself though.
from phoenix_live_reload.
Related Issues (20)
- New release that includes PR #96 HOT 2
- Allow adding custom attributes to iframe HOT 4
- Better hiding of iframe HOT 12
- Problems with page reload strategy in LiveView pages embedded via cross-domain iframes HOT 3
- Add debounce for live reloading HOT 5
- Live Reload isn't joining the channel HOT 3
- add new prefix option
- 1.6 support? HOT 2
- Live reload injected in wrong `body` HOT 1
- Changes to Functional Components not reloading correctly HOT 2
- Add option to do full page reloads when CSS changes HOT 3
- Unable to specify custom prefix for `live_reload/frame` url HOT 4
- Watch for changes outside the project folder HOT 1
- Browser freezing for two minutes on LiveReload HOT 3
- Release v1.3.4
- Debounce live reload events HOT 6
- Live reload breaks debugging session in elixirLS debugger HOT 4
- Live reload not triggering HOT 2
- Reciprocating a `Cross-Origin-Embedder-Policy` (COEP) of `require-corp`
- Warning during compilation on Elixir 1.15.x HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoenix_live_reload.