Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13798

cordova-plugin-network-information plugin throws runtime error

    XMLWordPrintableJSON

Details

    Description

      Hello!
      This is my first post on here, so I'm apologizing for anything I forgot or upsetting someone here

      I want to use the cordova-plugin-network-information and think I have installed it correctly. 
      I have an Ionic project with latest npm updates.

      Installed the plugin as stated here:

      https://ionicframework.com/docs/native/network/

       

      The folowing error pops up when compiling the project via ionic serve

      Uncaught Error: Unexpected value 'Network' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation.
      at syntaxError (compiler.es5.js:1694)
      at compiler.es5.js:15590
      at Array.forEach (<anonymous>)
      at CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15572)
      at JitCompiler._loadModules (compiler.es5.js:26958)
      at JitCompiler._compileModuleAndComponents (compiler.es5.js:26931)
      at JitCompiler.compileModuleAsync (compiler.es5.js:26860)
      at PlatformRef_._bootstrapModuleWithZone (core.es5.js:4536)
      at PlatformRef_.bootstrapModule (core.es5.js:4522)
      at Object.297 (main.ts:5)
      08:14:45.765

      Guessing what causes this is that I cannot test this plugin within my computer's browser, but then again I don't know how to test it then
      Any help is greatly appreciated

       

      Version is 2.0.1

      Attachments

        Activity

          People

            Unassigned Unassigned
            richter Gerald Richter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: