Description:
Building ios application on ionic fails due to missing config directory
Steps to Reproduce:
yarn global add [email protected]
ionic cordova platform add ios --no-resources
Output:
bash-3.2$ ionic --version
Cannot read property 'IONIC_CONFIG_DIRECTORY' of undefined
My ionic info:
Cannot read property 'IONIC_CONFIG_DIRECTORY' of undefined
Other Information:
@brotich What version of Node are you using? This error would imply that process.env is undefined.
@brotich Do you have ionic installed locally? If so, try uninstalling it.
What version of Node are you using? This error would imply that process.env is undefined.
Node version v10.11.0
@brotich Do you have ionic installed locally? If so, try uninstalling it.
node_modules, i have ionic installed in the globally via yarn global add ionicThe interesting path is that i don't have the same issue with version 4.1.2
cc: @dwieeb
@brotich Yes, within node_modules. Could you check?
ls node_modules/ionic
If it does not exist, I'm not sure what could be going wrong. Perhaps try reinstalling it?
@dwieeb
If it does not exist, I'm not sure what could be going wrong. Perhaps try reinstalling it?
@brotich Yeah, it's interfering. If the Ionic CLI detects that it is installed locally, it switches contexts and actually runs the local version. This is often how global/local packages work, like gulp or the Angular CLI. I must've missed something in the latest update.
The workaround is to match the global/local versions OR uninstall the local version, unless you need it for some reason:
npm uninstall ionic
@brotich Will be fixed in 4.3.1. I need to fix another issue before release
Thank you for the bug report!!
Most helpful comment
@brotich Will be fixed in 4.3.1. I need to fix another issue before release