After upgrading to Angular 12, my application is suffering from infinite reloads. This was working fine in Angular 11. I can only assume that something somewhere is putting files into the area being watched by angular. I've tried running serve in both production and development and it doesn't seem to make a difference. I can see no files being generated
The full command I am running is
ng serve --poll 1000
If I remove the poll command, it works fine (and then my changes are not picked up). This issue also occurs on ng build --poll 1000 --watch.
What can I try to remedy this? Is there a way I can tell angular to say why it rebuilt?
Maybe this thread can help,
https://github.com/angular/angular-cli/issues/20891
It looks like an Angular bug and there appears to be a completed PR that fixed it. You could try updating the minor or patch versions of Angular to grab that patch.
Related
This is the second time i'm commenting about this problem and I really hope you can help me this time since i've gained some more information about the problem. So the problem is basically that all my Django projects doesn't update the static files (this also includes projects which I have downloaded). So I can fx still see the old styling from the css files but the changes is not displayed. When i insert the css or js directly into the html file i can see it though. I thought that it maybe had something to do with my browsers stored caches but I have tried to do a hard refresh, clearing all my caches, installing whitenoise and forced browser to reload the css file by adding an extra parameter to the end of the src tag. I have also tried python manage.py collectstatic and almost everything else on this thread.
When the problem bagan to occur I was working with the implementation of stripe. I don't neccessarily think that stripe is the problem since the problem occured hours after i had already implementet the checkout site. I just think it's worth at least mentioning.
Some of my venv packages:
Django | 3.0.3
django-bootstrap4 | 2.2.0
stripe | 2.50.0
Weird behaviour:
Yesterday when I decided to comment out the bootstrap link to see if that was somehow the problem, the changes to the css file got applied to the site. I tried to do that several times and that seemed to be the problem but that only worked for like an hour. Now I cant apply any changes to the sites whatsoever.
My first post:
If you want to see my first post about the problem, you can check it out here. Keep in mind that the problem is not only happening to my Django projects but also the projects which i've downloaded.
I have no idea whats happening and I would very much appreciate your help. If you need any more information please just ask.
Edit:
I created a new folder and css/js file and it kind of worked. I believe the reason it worked was bcs whenever you create a new css/js file, Django needs to atleast load the content of the file once. But whenever I wanted to make other changes it suddenly didn't work again. In my file i had two links to css files. This should usually not be a problem, but apparently it was for me. I deleted one css link and It suddenly worked fine again. If anyone knows why this happened pls tell me, i'm all ears.
Assume you did everything correctly! I once faced this problem too and I fixed it by changed the directory name inside static folder to the same name as my app name. static/css/style.css change to static/app_name/style.css. Also don't forget to refresh the browser (ctrl + r or cmd + r). Hope this would help.
After using Bootstrap for a while I wanted to give Zurb Foundation a spin today. I like the grid system and various other elements of Zurb a lot better.
But I noticed refresh times on my (nearly empty) development app were very slow. When I checked the logs I saw dozens of lines like the following:
Warning. Error encountered while saving cache 6552595674261f5b11715c13321f2419e14e57a4/_global.scssc: can't dump anonymous class #<Class:0x0000000562f8e0>
They appear any time I make any change to my own (very basic) application.scss file.
#import "foundation_and_overrides";
#container {
background: #eee;
}
This is the only css I have in the project so far. The (relevant) gems in my project are:
foundation-rails (5.2.0.0)
sass (3.3.0)
sass-rails (4.0.1)
The sass gems were installed automatically as dependencies by Zurb.
This is all on my local development machine, using thin as a server. No Heroku or anything like that. Tried changing the local cache from file_store to memory_store, just in case, but it makes no difference.
Otherwise it's functioning fine, the css is rendered as expected, it's just painfully slow on each refresh because the cache is failing. Any thoughts would be greatly appreciated.
Hmm, seems to be a bug in sprockets, as you can see in the following issue: https://github.com/nex3/sass/issues/1144. Disabling config.cache_store in your development.rb file will solve the error, but is -of course- not the solution to your problem.
I think the answer to this SO question Heroku: Error encountered while saving cache may apply.
Basically, downgrade to sass 3.2.13 and the problem may just disappear for you, as it did for me.
(Oh, and you can switch back to Zurb Foundation, maybe ;-))
When I go to SpecRunner.html in my browser, the unit tests run fine. The issue I am having is if I change one of the tests, or the code that it tests and refresh the page, it doesn't load the new tests or change at all. I thought that this would be a cache issue, but I have the chrome dev tools disable cache selected.
What am I doing wrong?
Thanks
EDIT: tried restarting my computer, nothing. Clearing cache, nothing. I don't understand why this would be happening.
EDIT2: tried force reload, nothing... changed the file name and reference and still loaded the old code...
This might not answer your specific problem, as there are a million reasons this could happen.
For me, it was because I had deleted some files and then re-added them as a git submodule. After doing this, ls was showing me the OLD files, and I didn't realize that I had to go up a directory and then back in to interact with the new files I had just pulled down.
Old question but I ended up here when looking for an answer, so here's my solution in case it helps anyone - I was having a similar problem with jasmine-rails, removing jasmine-specs.js from public/assets did it for me. I'm using the jasmine-rails gem from https://github.com/searls/jasmine-rails.
The problem
I'm working on a Lift application for work, managed with sbt 0.11.2. I started working on some javascript files that get served by jetty, and found that they are locked once I run container:start. This is highly annoying because the lock doesn't go away until I completely exit sbt, but I want to be able to edit my files while I see them in the browser.
What I've tried
I googled around for a bit and found some old links like http://www.assembla.com/spaces/liftweb/wiki/Fix_file_locking_problem_with_jettyrun but I couldn't get the solution to work for the 'new' Jetty/SBT (where it's container:run instead of jetty-run). Even more annoying is that the more specific I make my search terms, the less helpful the results become.
Our sbt configuration is done with a build.sbt file, and not the full-fledged build.scala, and I won't be able to change that. I'm hoping that there's some setting that I can add in to stop Jetty from locking my files.
http://wiki.eclipse.org/Jetty/Howto/Deal_with_Locked_Windows_Files
I'm working on upgrading an app from MX7 to 9 and testing it on my Mac's Dev server. I have a page with a large cfswitch--20 or so different cases, but none more than about 10-12 lines long. In CF9 only, whenever one of these cases does a cfinclude (which is almost all of them), I get an error along the lines of:
org.apache.bcel.generic.ClassGenException: Invalid branch target position offset for jsr[168](3):-1: -1: astore[58](2) 27 at
cfindex2ecfm581352809._factor4(/Users/dlaughland/Workspace/abcapp/surveymanager /surveys/survey/index.cfm:34) at
cfindex2ecfm581352809._factor28(/Users/dlaughland/Workspace/abcapp/surveymanager/surveys/survey/index.cfm:33) at
cfindex2ecfm581352809.runPage(/Users/dlaughland/Workspace/abcapp/surveymanager/surveys/survey/index.cfm:1) at
cfApplication2ecfc1705547767$funcONREQUEST.runFunction(/Users/dlaughland/Worksp ace/abcapp/Application.cfc:215)
I have googled extensively, and the best explanation I can find is a JDK error that was supposedly fixed in MX7! What is causing this? How do I fix it? This isn't the only page with a large cfswitch so I really don't want to re-write everything into cfif structures.
You can file a bug, but here are some steps that might help you work around the issue.
Try updating your JRE version, you can get the latest and greatest here. You can then ask CF to use that JRE via your CF Admin > Server Settings > Java and JVM. Further instructions here.
Try using a servlet container, for example use Tomcat instead of the bundled JRun. Here are some instructions.
Can I ask if you are going to use this in production on a Mac? If not, try running your code on a OS that will mirror your live site. The bug (if it is a bug) may not be in that version of CF.
Hope something there helps.
If you upgraded from CF7 to CF9 with the code already on the server, try deleting all of the classes from WEB-INF/cfclasses and restarting CF.