carvalhoviniciusluiz / cpf-cnpj-validator

Valida e formata strings de CPF ou CNPJ.
MIT License
206 stars 27 forks source link

Can't resolve 'module joi' #4

Closed MallikaG closed 5 years ago

MallikaG commented 5 years ago

I have installed as "npm i cpf-cnpj-validator" and I got the error as ---

./node_modules/cpf-cnpj-validator/dist/cpf-cnpj-validator.es.js Module not found: Can't resolve 'joi' in '/node_modules/cpf-cnpj-validator/dist'

Then I tried to install joi as "npm install joi", and got below error

AssertionError: Must be invoked on a Joi instance.

push../node_modules/joi/lib/index.js.internals.callWithDefaults node_modules/joi/lib/index.js:32 root.string node_modules/joi/lib/index.js:94 Module../node_modules/cpf-cnpj-validator/dist/cpf-cnpj-validator.es.js node_modules/cpf-cnpj-validator/dist/cpf-cnpj-validator.es.js:138

Please guide me to resolve this issue.

carvalhoviniciusluiz commented 5 years ago

make sure the update that fixes your issue

MallikaG commented 5 years ago

I have taken the updated cpf-cnpj-validator , and I get below issue

AssertionError: Must be invoked on a Joi instance. ▼ 3 stack frames were expanded. push../node_modules/@hapi/joi/lib/index.js.internals.callWithDefaults node_modules/@hapi/joi/lib/index.js:29 root.string node_modules/@hapi/joi/lib/index.js:91 Module../node_modules/cpf-cnpj-validator/dist/cpf-cnpj-validator.es.js node_modules/cpf-cnpj-validator/dist/cpf-cnpj-validator.es.js:138

carvalhoviniciusluiz commented 5 years ago

the tests are passing, which is very strange. I need you to send me an example simulating this error so you can check.