Ember-cli 0.2.5 livereload keeps reloading in every change - ember-cli

After updating to ember-cli 0.2.5 (same think with 0.2.4; 0.2.3 was ok), when i make a change to a file and save it, it keeps reloading my app at least 3 times for each save i do. Server's console shows file added... file added... file added... for all my app files each time, but my tmp folder is always empty. Also is seems that for each reload it tries to create a folder inside tmp folder, but it quickly removes it every time. The only file inside tmp folder is .metadata_never_index. Does this have to do with caching? Any help? I'm on yosemite.

I had this problem with watchman 3.1.0 (which is the version that Homebrew installs) so I upgraded to 3.1.1 and it seems to have been resolved.
You'll need to install it from source, but it's easy:
$ brew uninstall watchman
Then just
$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
Fingers crossed it seems to have worked so far (thank goodness, as it was driving me CRAZY).

For anyone else that has the same problem, i reinstall node and watchman and now everything seems to work fine.
UPDATE I
It seems that the problem still exists. I have to mension that i'm using sublime text 3. When i restart sublime it seems ok, but after a save it starts reloading again and again. Anyone can help here?
UPDATE II
Removed watchman, falling back to NodeWatcher and all seems ok. But time to time i need to restart sublime text in order to boot up the ember-cli server. That seems to be a known issue...

Related

Can't use Watchman: "Operation not permitted"

Since updating Watchman recently (with Homebrew) I can no longer use it to watch projects. I get
{
"version": "2022.05.30.00",
"error": "std::__1::system_error: open: /Users/Path/To/Project: Operation not permitted"
}
I initially assumed that this must simply be file access issue I could resolve in the normal way, but giving the watchman app access to Files & Folders does not resolve the issue (even with termination of all watchman processes and restart of Terminal).
For good measure, I also manually added the watchman executable to Full Disk Access (something I've never needed to do before and am not comfortable with) but this also had no effect.
I have also terminated every relevant process I can think of, and even rebooted, twice. As far as I know the only change since Watchman worked was my running brew update watchman (which I have of course also uninstalled and reinstalled).
One concern is that for some reason I have multiple entries for watchmen in System Preferences, which weirdly results in it taking several dozen attempts to whack-a-mole all of them into a checked state for access:
How do I give Watchman the permissions needs to overcome this error?
Update Aug-19-2022
It looks like watchman: stable 2022.08.15.00 is working fine on my Mac M1. Upon start, you need to grant access to the local folders about to be synched.
Original
I also had the problem, like many others.
I reverted to a "working" version, e.g. 2022.05.16.00
There are multiple ways to do so; one (without private taps) would be:
Uninstall watchman
Downgrade the watchman.rb formula to an older version
https://github.com/Homebrew/homebrew-core/find/master
Navigate to watchman.rb
History -> select needed version -> View file -> Raw
Copy link to raw data
replace formula with that from raw version link
Install watchman according to that version
Pin it (to prevent further watchman updates)
Finally reset the watchman.rb formula to the original state again
# -- 1 -- uninstall
brew uninstall watchman
# -- 2 -- replace formula
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/8651d8e23d308e564414188509f864e40548f514/Formula/watchman.rb > /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/watchman.rb
# -- 3 -- install again, using replaced formula
brew install watchman
# -- 4 -- pin that version - Don't forget to unpin once this problem is solved...
brew pin watchman
# -- 5 -- reset formula to original
cd /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/
git checkout -- watchman.rb
Then shutdown any lingering instances of Watchman with
watchman shutdown-server
Remark: On Intel-Macs, homebrews repository is located at a different place. You can find out by calling brew --repository.
Typically, the Formula is expected in directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
Once the problems with watchman are solved, you can unpin watchman again and use the normal brew update/upgrade machanism.
On my M1 Mac:
My issue was that watchman didn't have permissions to ~/Documents folder. I don't know if this was the case before or after reinstalled it. Here are the steps I took:
brew uninstall watchman
brew install watchman
watchman shutdown-server (just in case it's running)
watchman watch-del-all
yarn start --reset-cache
When I tried to launch metro, MacOS prompted me to give permissions. After accepting, the bundler ran without issue.
It seems that the problem is that the watchman didn't have permission to access the ~/Documents folder. 🤔 Reinstalling watchmen seems to work as it triggers the grant access prompt.

ionic Object(...) is not a function even after reverting form git

I have a working application just a few minutes ago.
Then I installed some packages from SQLite, and Storage.
Until I got this error:
Object(...) is not a function
I must have not installed them properly so I tried to revert back from my previous git commit that I'm sure was working but after doing so, I still got the same error.
I'm not sure what to do, I already reverted back my codes.
I even restarted my ionic server and even my computer.
I also tried to remove my node_modules folder but still has the same error.
If you need more details please let me know.
Then I was able to get it work again. Phew!
(I went back to the latest commit with the error I had to try fix it)
I deleted my node_modules folder again.
Then, in my package.json,
I used the previous version numbers I had from my previous commit.
Then run $ npm install command.
You can get the idea from here that I could have reverted back from my recent working commit, deleted node_modules folder, then $ npm install.
With this in mind, I also removed the ~ and ^ for the versions, so I won't have that issue again.This depends on your strategy though, this can be either good or bad.
But come to think of it, I did installed a line of code with this command npm install #latest or was it ionic cordova plugin add ...#latest.
npm install --save #ionic-native/core#latest
While creating this answered, I decided to try and install it again just to make sure if the error would occur again but it didn't. It didn't even occur with just
npm install --save #ionic-native/core
I'm not sure anymore what could have caused it but now it's working as it should be. I'll leave this here for reference to others.

Images permissioning issue in IONIC 3 on OSX

I know how to use images in the imgs folder of the ionic the problem is something like this
1: I was trying to get to know with hotspot feature of OSX and accidentally I changed the name of my computer's local network which caused my NPM to crash, means no build were possible for IONIC except using SUDO commands which is not recommended by IONIC guys.
2: here what I did!! I uninstalled everything of IONIC ,NODE,NPM and CORDOVA and reinstalled them globally and all things worked just fine and all commands got back in action EXCEPT this new issue!
now that I was using images in img folder before all that mess !
whenever I run a command either to build or emulate I get unable to
access images error CAUSE PERMISSION ISSUES
here are the snapShots
well after a deep search I have found a solution thnx to my teacher Mike Hartington
here it is!!! how to solve the issue
I ran an ionic command with sudo most likely, which had changed the permissions of mine project
to solve I did this!
ran this command
sudo chown -R $(whoami) ~/<Path/to/project
then ran my build or emulate commands without sudo and every thing came to normal
hope this helps!

Ubuntu 14.04 upgrade broke all my virtualenvs

I've seen a couple of fixes for this, but none have worked for me, but I gather that its my virtualenvs that got broken. I just upgraded to 14.04 from 12.04, and now all my pyramid applications no longer work.
When I run ../bin/pserve development.ini, I get the following error:
ImportError: No module named _ctypes
When I run ../bin/python setup.py develop, (also when I try run pshell) I get:
ImportError: No module named _io
I've fixed one project (each pyramid app is in a separate virtualenv) by first removing the old project folder, then reinstalling the virtualenv instance and then copying my scripts back into it. But this is time consuming, and I have several projects.
Is there a quick fix for this?
I've seen removing duplicates of python and simple reinstall of virtualenv, but removing duplicates is not a good option, and the second solution didn't work for me. But maybe I did something wrong there.
I really think that there should be a quick fix for this. Surely reinstalling all virtualenvs cannot be the only solution?
You can simply do
cp /usr/bin/python2 /path/to/my-virtualenv/bin/python2
or
cp /usr/bin/python3 /path/to/my-virtualenv/bin/python3
(Don't need to make a new virtualenv.)
A quick fix that works is to create a new virtualenv and copy its bin/python to the broken virtualenvs. Five simple steps:
mkvirtualenv lero
cd ~/.virtualenvs
for d in */; do cp lero/bin/python $d/bin/python; done
deactivate
rmvirtualenv lero

Installing cocos2d 2.0 XCode templates

I'm trying to instal the cocos2d 2.0 XCode 4 templates but I keep getting errors when running the install script. I've tried to manually copy the templates but when I try to compile my project, it gives me a bunch of errors. Can anyone help?
Here are the errors that the install script throws at me:
http://pastebin.com/ZdmAxwef
Any help is greatly appreciated!
Thanks!
You probably install the cocos2d 1.x templates using root. Since installing as root isn't supported anymore, you first have to chown them back to your user.
There are three things you can try:
First, make sure you are running install-templates.sh as sudo
cd *location of cocos2d-2.0 folder*
sudo ./install-templates.sh -u -f
where -f forces the installation
Second, you may need to change the install-templates.sh script to install to a different location (try both your user and directly to the Machintosh HD)
Third, (which is what i often have done in the past) is copy the folders over to the correct directory (or at least make the directories the mkdir are failing on and try again)
I followed these exact instructions
cd /src/cocos2d-iphone-2.0/
./install-templates.sh -f
which i found here http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:migrate_to_v2.0
side note- on my mac hard drive "Macintosh HD" i created a folder src and copied the cocos2d-iphone-2.0 folder in it. and im running mountain lion and Xcode 4.4
this worked perfectly for me.
hope this helps
This is many years ago
The Solution is simple now, you know longer need to do any of this just.
install the latest version of Cocos2D from
cocos2d-swift.org
it will install everything automatically including the templates. just start a new Xcode project and it just be there in the template options