21. May 2016

Drupal's Drush Segmentation fault:11

Today I’m gonna show you how to fix segmentation fault:11 error in your DRUSH.

This is a conflict .info file and node modules. Remember, when we did the NPM install, some of the modules have .info file extension in them. drupal is now confused having more than one .info file in your theme. And some of the pages in your site may not load.

Let’s now fix this error. Delete the node_modules folder and add this script in your package.json.

  "scripts": {
    "postinstall": "find node_modules/ -name '*.info' -type f -delete"

Now when you do npm install add –unsafe-perm at the end.

sudo npm install --unsafe-perm

And now do drush and you’ll be good.

drush cc all

09. May 2016

MongoDB Permission

MongoDB starting : pid=12450 port=27017 dbpath=/data/db 64-bit host=arvind-MacBook-Pro.local
db version v3.2.5
git version: 34e65e5383f7ea1726332cb175b73077ec4a1b02
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
options: {}
exception in initAndListen std::exception: boost::filesystem::status: Permission denied: "/data/db/storage.bson", terminating
dbexit: rc: 100

Have you experience this error before? If yes! here’s how to fix it. All you need to do is to give permission to /data/ folder in the root directory.

sudo chown -R arvind:staff /data

Now try running mongod again and everythings a ok.


09. April 2016

My Second Take on React Native

I learned a lot by doing just this two pages react native project. It’s a battle when studying a new language, framework or library. You have to understand how the things connect, work and behave. It’s also different when you’re just watching a tutorial or reading a book/blog than doing it actually.

Dive Right In

Sometimes it’s a good idea to dive into the sea of React Native and start swimming, but if you have more time, I would study React first, then when you have a better understanding of what’s going with the framework, go and jump into React Native.

Getting MAIN.JS Get Going First

By default, when you create a new project in React Native, you get IOS and Android in a separate file. This really good if you want a different look and feel on each platform, but if your planning to use one design for both platforms, it’s better to create one file and calling them in each platform.

'use strict';
import React, {
} from 'react-native';

module.exports = class StaticPizza extends Component   {
'use strict';
import React, {
} from 'react-native';

import Main from './src/main';

AppRegistry.registerComponent('StaticPizza', () => Main);

I like this module, exactly what I was looking. This is really great if you’re leaning towards ios development. It’s easy to use and flexible.

GITHUB Link: https://github.com/react-native-fellowship/react-native-navbar

Styling and Flexbox

At first, Flexbox can be tricky, challenging and frustrating sometimes, but once you get to know it, its really cool. I like that REACT is limited when it comes to styling, just what you need to make a really good looking APP. They say “but out of limitations comes creativity” which is true.

I will try to explore more on React Native and build some small project on it. Hopefully, publish one or two this year if time permits.