I'm trying to add a job to a queue, but I get this strange error. I tried reading through the source code, searching but didn't find out what could cause it. I'm building using Webpack and tried both bundling and external load. No luck.
As soon as I know where it could come from I'll try to put together a mini repo.
v3.10.0

I suppose your real Bull version is 3.10.0.
The addJob is a wrapper function on ioredis instance that should be automatically created with client.defineCommand(). Commands are lua scripts bundled in Bull package. Looks like that your deployed artifact doesn't include these scripts.
Here is the place where it happens https://github.com/OptimalBits/bull/blob/develop/lib/commands/index.js#L43
I didn't used webpack, probably the easiest solution would be to inline contents of each script into JS objects and modify code of loadScripts to eliminate filesystem access.
That was the issue @stansv!
For people coming later, if you're on ZEIT Now v2, include this in your now.json config to include *.lua files:
```
{
"builds": [
{
"src": "lambda.js",
"use": "@now/node",
"config": {
"includeFiles": [
"*/.lua",
"../node_modules/bull/lib/commands/.lua",
"./node_modules/bull/lib/commands/.lua"
]
}
}
]
}
...
Most helpful comment
That was the issue @stansv!
For people coming later, if you're on ZEIT Now v2, include this in your
now.jsonconfig to include*.luafiles:```
{
"builds": [
{
"src": "lambda.js",
"use": "@now/node",
"config": {
"includeFiles": [
"*/.lua",
"../node_modules/bull/lib/commands/.lua",
"./node_modules/bull/lib/commands/.lua"
]
}
}
]
}
...