Monday 9 December 2019

Watchman error with Expo for running the React-Native app


Hey all after a very long time I am writing aboMyntra linkut some issues these days mostly in my weekend I have started a react-native course. So during the setup, I found some issues with Expo those who don't know about Expo. it is more like an emulator you can say hybrid emulator in a way because it will work for android and Ios with the same kind of setup. so writing this blog is about to mention one issue which I spend a day to fix then I realize to write it so it might help someone.

After running the expo via `sudo npm start` I got below error message which related to Watchman.




watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr=


And don't believe after spending a day I found one line code which works and fix the issue so fucking crazy .. :)

rm -rf /usr/local/var/run/watchman/root-state

You're running watchman as root but the state dir, which may contain trigger definitions and thus allow spawning arbitrary commands, is not owned by root. This is a security issue and thus watchman is refusing to start.

I'd recommend that you avoid running tools that wish to use watchman using sudo to avoid this happening again.
Thanks, that's all for today 
Happy coding guys.

Saturday 2 March 2019

Soltuion of : Error: `gyp` failed with exit code: 1

It's been a long time to write a blog on some tech issue. This is related to setup a NodeJS project I almost spend 2-3 hours to fix some f**king issue with `gyp`  while ruining npm install.


Error:

gyp: binding.gyp not found (cwd: /Users/anilyadav/Documents/ahok/base12) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/anilyadav/.nvm/versions/node/v6.9.2/lib/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/anilyadav/.nvm/versions/node/v6.9.2/bin/node" "/Users/anilyadav/.nvm/versions/node/v6.9.2/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/anilyadav/Documents/ahok/base12
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok 




gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/anilyadav/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/anilyadav/.nvm/versions/node/v6.9.2/bin/node" "/Users/anilyadav/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/anilyadav/Documents/ahok/base12/node_modules/bcrypt
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 
npm WARN b12prj@0.0.3 No repository field.
npm WARN b12prj@0.0.3 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.5 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/anilyadav/.npm/_logs/2019-03-03T06_59_17_870Z-debug.log

Anils-MacBook-Pro:base12 anilyadav$ node-gyp rebuild



So finally found that this is something related to bcrypt version so after runing the below command it's working fine.


Solution:

$ sudo npm install --save bcrypt-nodejs && sudo  npm uninstall --save bcrypt

Hope It will help to save your time 

Sorry for my bad english. ;)



Salesforce CRM vs. Zoho: A Comparative Analysis

Introduction: Selecting the right customer relationship management (CRM) software is crucial for businesses seeking to streamline their sal...