File path not resolve error after pass --prod flag


#1

Hi Guys,
Please help me to solve this error.
I have integrated Ionic Native file plugin my project and build my project using ionic command ionic cordova build android --prod and passing –prod flag. The build created successfully.
But when am launching my app it shows error Wrong type for parameter "uri" of resolveLocalFileSystemURI: Expected String, but got Null. and

TypeError
    at Object.checkArgs (cordova.js:429)
    at module.exports.resolveLocalFileSystemURL (resolveLocalFileSystemURI.js:49)
    at vendor.js:1
    at new t (polyfills.js:3)
    at e.resolveLocalFilesystemUrl (vendor.js:1)
    at e.value [as resolveLocalFilesystemUrl] (vendor.js:1)
    at e.resolveDirectoryUrl (vendor.js:1)
    at e.value [as resolveDirectoryUrl] (vendor.js:1)
    at e.createDir (vendor.js:1)
    at e.value [as createDir] (vendor.js:1)

I have pasted my code below

**this.plt.ready().then(() => {
      this.file.resolveLocalFilesystemUrl(this.utils.DIR_PATH).then(
        fileUrl => {
          console.log(fileUrl);
          this.file.createFile(fileUrl.nativeURL, "Maniya.txt", true).then(
            resp => {
              console.log(resp);
            },
            err => {
              console.log(err);
            }
          )
        },
        error => {
          console.log(error);
        }
      )
    });**

Please help me guys. Thursday we are going to demo.

Regards,
Mani