Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Invalid
-
None
-
None
-
None
-
cordova-plugin-file: 4.3.3
cordova: 7.0.1
Desktop: Windows 10
Description
I would like to load an Angular 4 project with Cordova. For this, I build my Amngular App with ng build and copy it into the /WWW directory of Cordova. This works so far.
Now I have installed the file plugin in the cordova project. In addition, I have installed the NPM module @types/cordova-plugin-file to the angular project, where the type definitions are inclued.
the structure:
- cordova projekt-root
-
- node_modules
- www
- plugins
-
-
- cordova-file-plugin
-
-
- ......
- angular projekt-root
-
-
- node_modules
-
-
- @types
-
-
- cordova-file-plugin
-
-
- @types
-
-
- src
- tsconfig.json
- .....
- node_modules
-
-
-
Here are the typesRoots Part of my tsconfig.json file, wich include all index.d.ts files from the"node_modules/@types" folder.
"typeRoots": [
"node_modules/@types"
]
It works for example for jJQuery or other libraries. But not for all cordova plugins. Because, in the index.d.ts files from cordova plugins, there are no exports. There are ony declarations from variables. But not exported.
When i run ng build, i get the error "Cannot find name 'device'." Is there an error in the typedefinitions from the cordova plugins?