NathanaelA / nativescript-permissions

Wraps up the entire Android 6 permissions system in a easy to use plugin.
MIT License
46 stars 22 forks source link

Exported external package typings file index.d.ts is not a module #20

Closed TimAtExc closed 5 years ago

TimAtExc commented 8 years ago

I am getting this error when building:

"error TS2656: Exported external package typings file '/........../........../node_modules/nativescript-permissions/index.d.ts' is not a module. Please contact the package author to update the package definition."

Any suggestions on how to resolve this? I commented out the module declaration and was able to move past the problem but is there a better way?

NathanaelA commented 8 years ago

Hmm, I just looked at the package and everything looks ok. What version of TypeScript?

TimAtExc commented 8 years ago

Typescript version 1.8.10....

Changing import permissions = require('nativescript-permissions') to let permissions = require('nativescript-permissions') seems to have resolved the issue, but this is different from how we reference other plugins...

Thanks for your hard work on a very useful plugin!

bradmartin commented 7 years ago

Should be able to remove the declare module {} https://github.com/NathanaelA/nativescript-permissions/blob/master/index.d.ts#L4 from the d.ts and then no warnings on the definitions.

mathieutu commented 6 years ago

Yeah, we have to remove the module. I'm doing it in a PR.

NathanaelA commented 5 years ago

Fixed in v1.3.0