truffle test : TypeError: Cannot read property 'filter' of undefined

Recently ran across this unintuitive error : 1 2 3 4 5 6 7 8 $ truffle test /usr/local/lib/node_modules/truffle/build/cli.bundled.js:128717 var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&"function"==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=! TypeError: Cannot read property 'filter' of undefined at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:318499:21 at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:267618:25 at FSReqWrap.oncomplete (fs.js:166:21) It took a bit of googling to figure out that error is far more innocent than it appears from the error and the stack trace.

How to install Vyper using pyenv and Virtualenv on macOS

Initially, setting up Vyper (an experimental language, with python-like syntax, for writing smart contracts on ethereum) seemed as simple as following the instructions. it wasn't. If you like to skip the details/troubleshooting, head over to TL;DR pyenv I've written about why I prefer pyenv earlier I'm not sure whether my “misfortune” was due to pyenv, but it could be. To top it off, I also used virtualenv as suggested in the official docs.

Diagrams in Orgmode

Recently, I had to create a technical document for a project, and I started with org-mode since that was easiest. Basic markup is easy in org, and was enough for me to get started. In order to share with external parties, I exported to HTML. In past I had tried docx but that did not work well, I wanted to export to PDF, but it requires pdflatex which seemed a lot of hassle.

How to Sync Github Fork with the original

First add the original repo as upstream remote using : 1 git remote add upstream https://github.com/ORIGINAL_OWNER You need to do this only once. Now each time you want to get the changes from the original, do the following : 1 2 3 git fetch upstream git checkout master git merge upstream/master See the github documentation for details.

How to use python to test your Ethereum Smart Contracts

Background I recently started working on Ethereum Blockchain development. Most of the tools, including the solidity language are biased towards javascript. While I managed to get started using truffle when it came to testing, I found that javascript tests were (IMO) unnecessarily too long. But that is the nature of the language. I have always been more comfortable with python than JS. I liked and have used py.test in my previous projects.