Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

After running npm run build-prod-cordova-android in my framework7 vue project my build is successful but I get this error just before my Cordova build:

Current working directory is not a Cordova-based project.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-prod-cordova-android: cross-env TARGET=cordova cross-env NODE_ENV=production node ./build/build.js && cd cordova && cordova build android
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-prod-cordova-android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

This is my current project structure
enter image description here

Kindly indicate what is wrong and possible solutions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
257 views
Welcome To Ask or Share your Answers For Others

1 Answer

Found the issue of this to be that the Cordova directory was missing the www/ folder so Cordova won't run, then again Framework7 setup this package for the build to be generated in the build folder.

I would advise you not to redirect your build(especially if you are not familiar with how to do it) rather you could copy the www/ folder in build/cordova and paste it into your Cordova project directory and build your apk from there.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...