m0dch3n / vue-cli-plugin-cordova

Vue Cli 3 Cordova Plugin
MIT License
417 stars 63 forks source link

Windows specific error occurs when running Cordova. #71

Closed oe-trader closed 5 years ago

oe-trader commented 5 years ago

The following error occurs when running cordova-serve-(platform) on Windows 10. The problem did not occur if I performed the exact same procedure on mac.

C:\tmp\cordova\myapp>npm run cordova-serve-browser

> myapp@0.1.0 cordova-serve-browser C:\tmp\cordova\myapp
> CORDOVA_PLATFORM=android vue-cli-service cordova-serve-browser
'CORDOVA_PLATFORM' is not recognized as an internal or external command, operable program or batch file.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp@0.1.0 cordova-serve-browser: `CORDOVA_PLATFORM=browser vue-cli-service cordova-serve-browser`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at themyapp@0.1.0 cordova-serve-browser script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-06-22T08_14_03_313Z-debug.log

My Env

cordova selected option

Name of... : default(src-cordova) ID of the App : com.example.myapp Name of the App : MyApp Select Platform:Android, iOS, Browser

Can I do anything?

m0dch3n commented 5 years ago

You can temporarily remove CORDOVA_PLATFORM=... in your package.json

oe-trader commented 5 years ago

Thank you very much. I was able to build. Is there a problem with running this package.json on Mac?