Nodejs – Error: ENOENT: no such file or directory, scandir ‘node_modules/node-sass/vendor’

I’ve experience weird moment today when trying to run my friend’s gulp script which call node-sass, it throw this error

Error: ENOENT: no such file or directory, scandir '**/node_modules/node-sass/vendor'

I call it weird because normally it has ‘vendor’ folder.

After Googling, visiting some stackoverflow pages, the solution is simple: just invoke these two commands

nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass

then you’re good to go 🙂


PostgreSQL: Create Database, User and Grant Privileges

Open terminal and invoke this command:

psql -U postgres

to create new database, invoke this command:


to create new user, invoke this command:

CREATE USER dbuser WITH PASSWORD 'mypassword';

then, you can set your desired user-related preference like this

ALTER ROLE dbuser SET client_encoding TO 'utf8';
ALTER ROLE dbuser SET default_transaction_isolation TO 'read committed';
ALTER ROLE dbuser SET timezone TO 'UTC';

to grant privileges, invoke this command:


Quit from PostgreSQL console


Python Date/Time Libraries

Maya: DateTimes for Humans

Arrow: Python library that offers a sensible, human-friendly approach to creating, manipulating, formatting and converting dates, times, and timestamps

Pendulum: Python Date/Time Made Easy

Delorean: Time Travel Made Easy

Moment: Dealing with dates in Python shouldn’t have to suck

udatetime: Fast RFC3339 compliant date-time library

Fast ISO8601 date time parser for Python written in C

Django Error : CSRF cookie not set

Django version: 1.11.11

This error occurred when you try to submit POST form via Postman 2 App

My temporary solution is disabling CSRF Checking by creating a custom middleware.

Just create a new file on the same folder with your file, let’s name it and put these code:

from django.utils.deprecation import MiddlewareMixinfrom django.utils.deprecation import MiddlewareMixin
class DisableCsrfCheck(MiddlewareMixin):
 def process_request(self, req): attr = '_dont_enforce_csrf_checks' if not getattr(req, attr, False): setattr(req, attr, True)

then add this on before django’s CSRF middleware: