cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CB-13728) Types are not loaded into angular typescript project
Date Wed, 21 Nov 2018 00:00:00 GMT

     [ https://issues.apache.org/jira/browse/CB-13728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

jcesarmobile closed CB-13728.
-----------------------------
    Resolution: Cannot Reproduce

I can't reproduce.

You have to add the types like this on top of the .ts you are going to use the plugin
{code}
/// <reference types="cordova-plugin-camera" />
{code}

If you still face the issue, report a new issue on the github repo providing more information,
and a sample project if possible https://github.com/apache/cordova-plugin-camera/issues

> Types are not loaded into angular typescript project
> ----------------------------------------------------
>
>                 Key: CB-13728
>                 URL: https://issues.apache.org/jira/browse/CB-13728
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-camera
>    Affects Versions: cordova-android-7.0.0
>         Environment: MacOS High Sierra
> npm -v 
> 5.6.0
> node -v 
> v8.4.0
> typescript 2.5.3
>            Reporter: Dmitriy
>            Priority: Critical
>
> When installing cordova-plugin-camera package via npm, types are not properly loaded
in angular2 application:
> When trying to build or serve receiving such error:
> ERROR in error TS2688: Cannot find type definition file for '.github'.
> error TS2688: Cannot find type definition file for 'appium-tests'.
> error TS2688: Cannot find type definition file for 'doc'.
> error TS2688: Cannot find type definition file for 'jsdoc2md'.
> error TS2688: Cannot find type definition file for 'src'.
> error TS2688: Cannot find type definition file for 'tests'.
> error TS2688: Cannot find type definition file for 'www'.
> src/app/components/myprofile/photo-upload-modal/photo-upload-modal.component.ts(26,19):
error TS2339: Property 'camera' does not exist on type 'Navigator'.
> src/app/components/myprofile/photo-upload-modal/photo-upload-modal.component.ts(29,69):
error TS2304: Cannot find name 'Camera'.
> src/app/components/myprofile/photo-upload-modal/photo-upload-modal.component.ts(29,103):
error TS2304: Cannot find name 'Camera'.
> src/app/components/myprofile/photo-upload-modal/photo-upload-modal.component.ts(31,29):
error TS2304: Cannot find name 'Camera'.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message