NativeScript: Bug : Incorrect `/// When doing tns create MyApp --ng ,
project is created with

And that file contains :
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
Now this is incorrect value.
becuase triple slash starting with ./ are relative and there is no such files there. ( io.d.ts etc…)
this is causing problems like the one I’ve asked aboutr :
https://stackoverflow.com/questions/47757276/reference-path-to-node-modules-is-not-found
When doing tns create MyApp --ng ,
project is created with

And that file contains :
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
Now this is incorrect value.
becuase triple slash starting with ./ are relative and there is no such files there. ( io.d.ts etc…)
this is causing problems like the one I’ve asked aboutr :
https://stackoverflow.com/questions/47757276/reference-path-to-node-modules-is-not-found
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
@RoyiNamir this is simply a design fault by the author of the wrapped plugin (@spartadigital/nativescript-permissions). In comparison using the nativescript-permissions by @NathanaelA does not have such issue.
You can easily resolve this issue by correcting the path of the reference for the plugin as follows:
node_modules/@spartadigital/nativescript-permissions/references.d.ts
However, keep in mind that this would require that your project has installed tns-platform-declarations (which you have already added as a devDependency).
OOPS I accidently closed this .
How can I reopen it ? sorry about that.
@RoyiNamir you are right, and this is still a bug (the
references.d.tsfile should not be located intns-core-modules).Just pointing out that this won’t be a stopper if your
tsconfig.jsonis respected by the IDE (the difference between VSCode and WebStorm) and you have the following in this file:As the file (
node_modules/tns-core-modules/references.d.ts) is actually never used the error is only observed during the TypeScript transpilation and won’t lead to runtime errors. So in your case WebStorm is causing the build time error as it is not respecting the above option in<project-name>/tsconfig.json