Closed BebeSparkelSparkel closed 6 years ago
The docs show to require celebrate like below:
// try-celebrate.js const { celebrate, Joi, errors } = require('celebrate'); console.log('celebrate', celebrate);
terminal
$ node try-celebrate.js celebrate undefined
but celebrate is undefined. The below is what works for me to get the celebrate object:
const celebrate = require('celebrate') const { Joi, errors } = celebrate console.log('celebrate', celebrate)
node
celebrate
joi
npm ls --depth=0 | grep joi
If you're using an old version of celebrate (which you are) you need to check the tagged version of the read me here.
npm update celebrate obviously not working Thanks!
npm update celebrate
The docs show to require celebrate like below:
terminal
but celebrate is undefined. The below is what works for me to get the celebrate object:
node
version - v8.5.0celebrate
version - celebrate@6.0.1joi
version (vianpm ls --depth=0 | grep joi
) - joi@12.0.0