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
Ionic v3 Live Reload not working #2306
Comments
Consolidating to #2312 |
Thanks @dwieeb but it is the same situation just using |
Ah, sorry @silverbackdan. I did not see that it wasn't working for you with Can you show me the output of |
Thanks! No worries, here is serve:
Should I see anything log when a file changes? I can't see anything appear with any html, ts or scss file changes. I wonder if it's permissions on the files or if the files are never actually watched. That or perhaps I'm missing a dependency. Also
|
Same issue here. I do:
|
Miguelonga .I got that using Cordova run Android |
Ionic serve stopped working for me yesterday. I'm not sure if it stopped working when I updated the cli but I did notice the added The issue is that when I run EDIT: |
@dwieeb Is there anything else I can provide or do to help you with this issue? |
Is this not the service worker issue @manticarodrigo described? That's been the solution for a few people now. |
Unfortunately not, this is my index.html <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<script data-ionic="inject">
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.2.1';i.angular='4.1.0';i.staticDir='build/';})(window);
</script>
<meta charset="UTF-8">
<title>App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- cordova.js required for cordova apps -->
<script src="cordova.js"></script>
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script> -->
<link href="build/main.css" rel="stylesheet">
</head>
<body>
<!-- Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script>
<!-- The bundle js is generated during the build process -->
<script src="build/main.js"></script>
</body>
</html> I'm also on the latest version of Ionic so when I run serve, the service script is automatically commented out. I did just have a website where webpack caused issues on though, it wouldn't compile scss to css (or it would, the final file just wouldn't appear) but it'd be OK with JS and copying assets, but struggled with watching as well, even though node-sass would watch without an issue. So I imagine this will be more related to Webpack now I've spotted that is what's being used in the output. |
It appears my issue lies mainly with webpack so I've raised an issue there. A webpack installation on a web-based Laravel project is not watching files or creating the final css files. Thanks for coming back to me though @dwieeb |
Ah ha! In one of my parent folders I had used brackets. Webpack watch command was therefore not working. I've raised an issue there webpack/webpack#5018 - I think this issue is OK to close :) |
Can I add one last thing, the CLI update most recently appears to comment out the service worker script again. However it also seems to remove meta tags (content-security-policy) - should I add as a new issue? |
@silverbackdan Glad you got it. For build issues, generally the best place to create an issue is in the app-scripts repo: https://github.com/ionic-team/ionic-app-scripts |
i have the same issue with ionic 3.4.0 but i dont have the ionic watch ready ... see
[17:35:41] ionic-app-scripts 2.1.4 |
So, I solved it in such way:
Edit:
Then, add such line to package.json:
And try it, works for me (tested few minutes now - but it doesn't work about half day ;) |
Not works anymore after few hours.... ( |
@airstep Just tried, but it is not working hh |
the version 2.1.4 of |
@Lahrachtdi - so, I have already this version - but it's not work with livereload |
@airstep I don't know what's happen, it is not working anymore |
I had this problem for 3 days now. I solved it by making sure that the path to the app doesn't contain spaces. |
@sbonder101 My path is without any spaces - no luck |
@airstep I just created a new project, and I copied the 'src' folder from the old directory, and the package.js file. And installed all the necessary plugins and it worked |
@sbonder101 but it some times work sometimes not... random |
@sbonder101 what do you mean for "the path to the app doesn't contain spaces." I already have this problem... not solved! My ionic info:
|
I think this node is closed - so we must go there: |
Just learned about Stencil and when using demo found that I have error from node.js ENOSPC (not enough space on the drive but I have more than need) After that I just looked at different issues and found this one:
And after that livereload again works for project that before has no reaction. |
Thanks @airstep. Setting max_user_watches to a higher value fixed the livereload problem for me too. |
Thanks @airstep, the fix is works for me! |
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port [OK] Development server running! C:\Users\Lwisl\projects\tesing> |
@Tulika12 |
Thanx...@anesask |
Thanks @airstep, the fix is works for me! |
@anesask change port doesn't work in my case. Even don't know how to debug it. |
i ran this:
and now seems to work again. |
@airstep this solution does not work on my mac os 10.13.4 it returns the error below
|
What is this? |
From @silverbackdan on May 17, 2017 12:7
Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[X] 3.x
I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
While running
ionic serve
orionic run <platform> -l
no file changes trigger a reload or have any effect. (live reload not working). Are there any dependencies I need to make sure are installed myself or any way of outputting any logs on the files that should be being watched or running the watch command on it's own with a verbose output?Expected behavior:
Live reload should be working and enable updates to html/scss files etc. to be reflected without a rebuild.
Steps to reproduce:
ionic serve
orionic run <platform> -l
Related code:
N/A
Other information:
Output when starting to run on the browser platform with livereload. It opens a browser on port 8000, I'm not sure if it should be 8100 - either way, neither port seems to update when scss files or html files are changed and saved.
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):Copied from original issue: ionic-team/ionic-framework#11700
The text was updated successfully, but these errors were encountered: