Here is the command I used to install @ionic-native/core:
npm install @ionic-native/core --save
TypeScript code snippet:
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { HomePage } from '../home/home';
import { ActionSheetController, ToastController, Platform, LoadingController, Loading } from 'ionic-angular';
import { Camera, File, Transfer, FilePath } from 'ionic-native';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
declare var cordova: any;
// Rest of the TypeScript code...
PHP code snippet:
<?php
header('Access-Control-Allow-Origin: *');
$target_path = "doc/";
// Rest of the PHP code...
?>
In the TypeScript code, another method was attempted and although the error "
main.js:61208 Uncaught Error: Cannot find module "ionic-native"
" did not occur, there seems to be an issue with image uploading where it shows only "loading..." without functioning properly.
Lastly, below is a snippet from the package.json file:
{
"_args": [
[
{
// Package details...
}
]
],
// Other package settings...
}