I have a file x.js which works fine on it's own.
function test() {
console.log("test");
}
I want to include this into truffle, so I do the following
truffle(development)> exec ./x.js
Using network 'development'.
TypeError: fn is not a function
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-require/require.js:128:1
I do not understand the error, how to fix?