0

I got this error after changing the package name and delete some folder in npm folder , how ever i have revert it back to it's original name but the error still exists

The error

Khurshid Ansari
  • 4,638
  • 2
  • 33
  • 52
Firdaus Ismail
  • 145
  • 1
  • 2
  • 11
  • 1
    I answered the same question here: https://stackoverflow.com/questions/55127362/fs-extra-source-and-destination-must-not-be-the-same-cordova/55134598#55134598. Maybe that helps. – Mike Quade Mar 13 '19 at 05:10

2 Answers2

3

At first, manually remove this:

node_modules folder

package-lock.json file

platform > android folder

enter image description here

enter image description here

then use this commend:

1 => npm rm -rf node_modules package-lock.json
2 => npm cache clear --force
3 => ionic cordova platform add android@8.0.0
4 => ionic cordova prepare android
5 => ionic cordova run android
MD.Riyaz
  • 412
  • 3
  • 9
1

Your best option would be to remove the platform and re-add it with the following commands:

ionic cordova platform rm android
ionic cordova platform add android

That should do the trick.

Tachyon
  • 2,171
  • 3
  • 22
  • 46