Ember failed to find watchman - ember.js

When I run ember test I got this
Could not start watchman
I can confirm that I have installed watchman, when I run which -a watchman, I got
/usr/local/bin/watchman
Am I missing something?
Fyi
ember -v return
ember-cli: 2.15.1
node: 8.6.0
os: linux x64

Try to reinstall watchman
$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.9.0 # the latest stable release
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
More info here

Now, above process fails with error bser.cpp:345:17: error: offset of on non-standard-layout type 'json_object_t' in step make on macos, just upgraded to 10.15.6 catalina due to xcode upgrade issue, cmdline tools Apple clang version 12.0.0 (clang-1200.0.32.2)
Patching with these changes made it work to install watchman successfully tagedg v4.9.0

Related

-bash: ask: command not found

I have mac and was trying to install Alexa cli with below command:
sudo npm install -g ask-cli
My installation was showing successful but it was giving me below error on ask --version :
-bash: ask: command not found
I am using node version > 12
Can any one help ?
I googled lot but could not found the answer. Got frustrated. So
finally thought of putting.
I have mac and was trying to install Alexa cli with below command:
sudo npm install -g ask-cli
My installation was showing successful but it was giving me below error on ask --version :
-bash: ask: command not found
I was using node version > 12
Finally after almost 6 hours of RnD i could solve this error by downgrading node to version 8
Below are the detailes what i did:
THis was my prev version which was giving error
Anands-MacBook-Air:~ anand$ node -v
v13.6.0
How to downgrade to lower version of node :
Anands-MacBook-Air:~ anand$ sudo npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
Anands-MacBook-Air:~ anand$ sudo npm install -g n
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n#6.1.3
updated 1 package in 27.206s
Anands-MacBook-Air:~ anand$ sudo n 8 5.8
installing : node-v8.17.0
mkdir : /usr/local/n/versions/node/8.17.0
fetch : https://nodejs.org/dist/v8.17.0/node-v8.17.0-darwin-x64.tar.gz
installed : v8.17.0 (with npm 6.13.4)
Anands-MacBook-Air:~ anand$ node -v
v8.17.0
Then did below :
Anands-MacBook-Air:~ anand$ sudo npm install -g ask-cli
Anands-MacBook-Air:~ anand$ ask --version
1.7.22
Anands-MacBook-Air:~ anand$
Hope it will help someone.
If you use nvm, you might need to install it on your current Node.js version.
Exiting out of the terminal session and opening up a new terminal session solved this for me on MacOS.

Ionic CLI not uninstalling

This is related to my previous question here which was never resolved. I am trying to fix the problem by doing a fresh reinstall of Ionic.
I first tried uninstalling Ionic with sudo npm uninstall -g ionic, and it completes with no errors, but doing ionic -v still outputs 2.1.1, so obviously it didn't really get uninstalled. After that I tried sudo npm install -g ionic#latest, and my problem still persists.
What is even weirder is what happened when I tried to create a new project from scratch to test it. I did ionic start test --v2 on my Ubuntu machine, and doing ionic serve still does the same thing that I stated in my previous question.
npm uninstall -g ionic
npm uninstall -g #ionic/cli
finally i was able to uninstall with this...
I had the same issue for resolving this
Run npm uninstall -g ionic
Go to the location "/usr/local/bin/"
Delete Ionic File
Close terminal
Open new terminal and run "npm uninstall -g ionic"
Now run "ionic -v"
This probably happens due to multiple installations of ionic in your machine, more so this happens on windows.
Run:
"where ionic" in your command prompt
if it does not work try :
"which ionic" !! (probably linux)
This will give you the location of your installed ionic, in windows its mostly ..Local\AppData\Roaming.. somewhere.
Go to that location delete ionic and ionic.cmd file there.
Run: ionic -v now, make sure it gives you an error.
Be Happy if you see error.
run: npm install ionic#latest -g now
Run: ionic -v, make sure you see your latest ionic version there.
Be more happy now.
Uninstall cordova and ionic.
npm uninstall -g cordova
npm uninstall -g ionic
Then check to make sure you have the right version:
ionic -v
Use this command please
npm uninstall -g #ionic/cli
What is your node and npm versions ?
Please update latest node js (https://nodejs.org/en/download/current/)
then check that
node -v
npm -v
Node version must be v8.5.0 (includes npm 5.3.0) and then
sudo npm uninstall -g ionic
sudo npm cache clean --force
sudo npm install ionic
check the ionic version
ionic -v
version will be ^3.10.1. If everything is ok you can use new project command as given below
ionic start --list
you can see what kind of project types here as an example
ionic start blank
You can try running the command as below, it worked for me:
sudo npm uninstall -g #ionic/cli
If you are checking the ionic version inside project folder then
try to remove the ionic cli without -g option. It may be possible that you have installed local version of ionic inside project.
If you're using nvm, remember to delete ionic from where ionic. I deleted it via nvm uninstall {{version}}.

Unable to install ionic2 on Mac OS by installing node and npm also

unable to install ionic 2
Successfully Installed ionic2#beta using
sudo npm install -g ionic#beta
ionic -v shows version 1.7.14
Uninstalled using npm uninstall -g ionic
Successfully (based on printout) uninstalled ionic 2
ionic -v shows version 1.7.14 (WTF)
Tried npm uninstall -g ionic again
Received command prompt immediately, no other outputs (no affect)
ionic -v shows version 1.7.14
You have 2 choices.
As comment suggests do:
sudo npm install -g ionic#beta
You will have to do this for every global command as you dont have permission to the folders.
Or
Check npm fix permission issue
You can change the global node module directory of npm so that you wont need permission. You can also use app like homebrew to set up your node.

Could not start watchman; falling back to NodeWatcher for file system events

I get the below error message while I switch between my ember applications:
version: 2.4.2
Could not start watchman; falling back to NodeWatcher for file system events.
Visit ember-cli.com for more info.
Livereload server on http://localhost:49153
Could not serve on http://localhost:4200. It is either in use or you do not have permission.
Here are the packages that I have setup on my machine:
npm --version
2.14.20
bower --version
1.7.7
ember --version
2.4.2
node: 4.4.0
os: linux x64
Ember-cli (starting from release 0.1.3) requires watchman or some other service (e.g. NodeWatcher) for file watching.
You can find this info in the ember-cli release 0.1.3 changelog:
https://github.com/ember-cli/ember-cli/releases/tag/v0.1.3
Although I believe you could use your Ember app without watchman, could you confirm that you already have watchman installed?
If not, here's what works fine for me in Ubuntu 64bit:
// installing watchman from source
git clone https://github.com/facebook/watchman.git
cd watchman
./autogen.sh
./configure
make
sudo make install
if you still have problems after installing try also resetting your watchman configuration:
watchman watch-del-all
watchman watch-del /home/myproject // your project folder goes here...
watchman watch-project /home/myproject // your project folder goes
full installation instructions regarding watchman can also be found here
https://facebook.github.io/watchman/docs/install.html

Cross compile on Fedora 18 for Centos 6.4

I am working on a Project, which uses classes from the C++11 standard, on a Fedora 18 machine and want to deploy it on a Centos 6.4 server.
I was able to resolve all loader errors except for the libc and libc++ versions, which are GLIBC_2.11, GLIBCXX_3.4.15 and on my Fedora machine GLIBC_2.14 and at least GLIBCXX_3.4.17 respectively.
Is it possible to tell the compiler to compile/link for the server versions or older compatible versions of the libraries?
When i run ldd executable i get
./executable: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./executable)
./executable: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./executable)
Thanks in advance!
Instead of manually copying libraries to a separate directory you could set up a chroot contaiing the CentOS build env, using mock and the epel-6-x86_64 config.
Use yum in the mock chroot to install the packages you want (e.g. Qt) and build in there, that will ensure the code only uses the CentOS 6 libs that are installed in the chroot, not the rest of the packages on your Fedora OS.
Update:
When I'm using a mock chroot for building GCC I do this:
# only need these steps once to setup the chroot
mock -r fedora-19-x86_64 --init
mock -r fedora-19-x86_64 --install yum
mock -r fedora-19-x86_64 --shell 'mkdir -p /builddir/gcc/src /builddir/gcc/build'
su -c 'mount --bind $PATH_TO_GCC_SOURCES /var/lib/mock/fedora-19-x86_64/root/builddir/gcc/src'
# enter root password
mock -r fedora-19-x86_64 --shell
# now in chroot
yum install gmp-devel mpfr-devel libmpc-devel flex autogen
su - mockbuild
cd gcc/build
../src/configure --prefix=/builddir/gcc/install ... etc. ...
For your purpose you'd replace fedora-19 with epel-6
The bind mount means I don't need to have the GCC sources in the chroot, I can use the existing copy in my normal filesystem. See http://gcc.gnu.org/wiki/InstallingGCC for info on building GCC
Once you install GCC in the chroot you can use it to build your own programs then package them up for CentOS.
To go back into the chroot again later:
mock -r fedora-19-x86_64 --shell
su - mockbuild