I can't build android app


#1

ionic cordova build
? What platform would you like to build (android, ios): android
ionic-app-scripts build --target cordova --platform android
module.js:549
throw err;
^
Error: Cannot find module ‘…/dist/index’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/root/myApp/node_modules/.bin/ionic-app-scripts:19:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
ionic-app-scripts build --target cordova --platform android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
root@ainydev-T58-D:~/myApp# ls
config.xml files.list node_modules package-lock.json plugins src tsconfig.json www
env.vim ionic.config.json package.json platforms resources tags tslint.json


#2

Try to remove node_modules folder and run npm install, then try to build again