After I migrate my project to cli 6 tns migrate update cocoapods/brew/node/everything..
tns run ios
Webpack build done!
Project successfully prepared (ios)
Cannot read property 'toLowerCase' of undefined
The app was compiling and running fine before I upgraded to v6?
@sputn1k,
Try the following:
rm -rf node_modules hooks platforms && tns run ios
@Fatme , Still says the same thing - Cannot read property 'toLowerCase' of undefined
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `ProjectName.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 11 total pods installed.
Project successfully prepared (ios)
Cannot read property 'toLowerCase' of undefined
@sputn1k,
Can you execute the command with --log trace (tns run ios --log trace) and send us the produced log ?
Android also having the same issue. i ran with tns run android --log trace
Cannot read property 'toLowerCase' of undefined
Error: Cannot read property 'toLowerCase' of undefined
at Errors.failWithOptions (C:\Users\
at Errors.fail (C:\Users\
at DevicesService.
at Generator.throw (
at rejected (C:\Users\
at processTicksAndRejections (internal/process/task_queues.js:86:5)
I resolved it looking for in ./hooks folder. I found hookArgs.platform.toLowerCase() and I had to change to (hookArgs.platform || '').toLowerCase();
This issue is probably caused by plugin hooks which are not compatible with NativeScript 6.0.0. @Oscarato fix is what should be applied in the plugin itself.
As there's nothing to do in the CLI, I'm closing this issue.
Most helpful comment
I resolved it looking for in ./hooks folder. I found hookArgs.platform.toLowerCase() and I had to change to (hookArgs.platform || '').toLowerCase();