First, add an :externs
key to the :compiler
map in project.clj
:
;...
:compiler {;...
:externs ["externs.js"]
;...
}
externs.js
is the name of the file that we use to declare our protected symbols. You could use whatever name you wanted to.
Next, create the externs.js
file:
% cat > externs.js <<-EOF
var process = {};
process.argv = [];
EOF
From http://blog.lauripesonen.com/why-isnt-my-nodecljs-app-working-in-advanced-mode/