mint-metrics / mojito-js-delivery

🧪 Source-controlled JS split testing framework for building and launching A/B tests.
https://mojito.mx/docs/js-delivery-intro
Other
16 stars 29 forks source link

Scaffolding tests in a new container throws "Error: ENOENT: no such file or directory, scandir 'lib/waves/'" #24

Closed kingo55 closed 4 years ago

kingo55 commented 4 years ago

I was setting up a new container earlier and the following error was thrown when I went to create a new demo test:

➜  mlg git:(master) gulp new --demo w1
[15:40:09] Using gulpfile ~/Documents/mojito-pipelines/mlg/gulpfile.js
[15:40:09] Starting 'new'...
[15:40:09] 'new' errored after 3.44 ms
[15:40:09] Error: ENOENT: no such file or directory, scandir 'lib/waves/'
    at Object.readdirSync (fs.js:790:3)
    at testExists (/Users/robertkingston/Documents/mojito-pipelines/mlg/scripts/cli-new.js:36:20)
    at createTest (/Users/robertkingston/Documents/mojito-pipelines/mlg/scripts/cli-new.js:82:9)
    at module.exports (/Users/robertkingston/Documents/mojito-pipelines/mlg/scripts/cli-new.js:17:5)
    at cliNew (/Users/robertkingston/Documents/mojito-pipelines/mlg/gulpfile.js:180:5)
    at taskWrapper (/Users/robertkingston/Documents/mojito-pipelines/mlg/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:402:14)
    at runBound (domain.js:415:12)
    at asyncRunner (/Users/robertkingston/Documents/mojito-pipelines/mlg/node_modules/async-done/index.js:55:18)
    at process._tickCallback (internal/process/next_tick.js:61:11)

When I created a waves folder under lib, it worked fine though. I think the scaffolding feature needs to create the waves folder if it doesn't exist (a probable scenario for new users).

allmywant commented 4 years ago

@kingo55 Fixed, I've sent a pull request.