Ask Your Question

Can't add external JavaScript library

asked 2018-09-26 15:36:09 -0600

kranthi gravatar image

updated 2018-10-11 18:09:56 -0600

metadaddy gravatar image

I am trying to add moment.js file ( In my StreamSets pipeline, I have


state.moment = require('moment');

I am following this blog post:

I get the following validation error

validation error : SCRIPTING_08 - Script error while running init script: javax.script.ScriptException: ReferenceError: "require" is not defined in <eval> at line number 2
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-26 17:48:21 -0600

kranthi gravatar image

load('file:///usr/lib/moment.min.js') inside script just works fine..

var date = moment().format()

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-09-26 15:36:09 -0600

Seen: 366 times

Last updated: Oct 11 '18