DiegoSestito / ngx-cpf-cnpj

This is a simple library, containing a mask and a validator for CPF/CNPJ in the same input.
Other
6 stars 2 forks source link

Compiling error #1

Closed nncl closed 5 years ago

nncl commented 5 years ago

Hello.

I'm getting the following error when adding into my app's module:

ERROR in node_modules/ngx-cpf-cnpj/lib/cpf-cnpj-validator.directive.d.ts(6,37): error TS1144: '{' or ';' expected.
node_modules/ngx-cpf-cnpj/lib/cpf-cnpj-validator.directive.d.ts(7,23): error TS1005: ';' expected.
node_modules/ngx-cpf-cnpj/lib/cpf-cnpj-validator.directive.d.ts(8,1): error TS1128: Declaration or statement expected.
DiegoSestito commented 5 years ago

Hello, can you give me more info about your project? What is the angular version? How are you doing the import?

nncl commented 5 years ago

Hi, thanks for the quick response.

The project I've tested for the first time used Angular 6, and the way I'd imported was exactly the same as you described on readme.md file.

However, I just tested on a fresh angular 7 project and worked like a charm. I'm so sorry burning your time.

Thanks for your patience.

DiegoSestito commented 5 years ago

No problem, I forgot to mention that it was only tested in the latest version, 7.x. I will change the documentation soon, if you wish, you can do a pull request with readme.md updates and I will close this issue...

nncl commented 5 years ago

Hello @DiegoSestito.

There's something I realized just right now and I really think that's the initial problem. It was a problem with typescript dependency. For the first time, I was using this:

"typescript": "~2.7.2"

I changed to:

"typescript": "~2.8.*"

And it's working as expected.

I realized this talking to a friend responsible for deploys, who told me that was related. After that, googling the error message had shown many fixes about it.

So, I think it's ok to close this issue.

Thanks again.