Tns run android error: Path must be a string; Received undefined (3.0.0)



I’m having an issue after updating my project to version 3.0.0 (was: 2.5.3). I get the following error doing a tns run android --log trace:

Hooks directories: [ 'C:\\Users\\Bronco\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\hooks',              
  'C:\\devtns\\sailert\\hooks' ]                                                                                      
BeforeHookName for command prepare is before-prepare                                                                  
Executing before-prepare hook from C:\devtns\sailert\hooks\before-prepare\nativescript-dev-android-snapshot.js        
Executing before-prepare hook at location C:\devtns\sailert\hooks\before-prepare\nativescript-dev-android-snapshot.js 
Validating before-prepare arguments.                                                                                  
Failed during hook execution.                                                                                         
Path must be a string. Received undefined                                                                             
Error: Path must be a string. Received undefined                                                                      
    at Object.<anonymous> (C:\Users\Bronco\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:15:23)  
    at Module._compile (module.js:570:32)                                                                             
    at Object.Module._extensions..js (module.js:579:10)                                                               
    at Module.load (module.js:487:32)                                                                                 
    at tryModuleLoad (module.js:446:12)                                                                               
    at Function.Module._load (module.js:438:3)                                                                        
    at Module.require (module.js:497:17)                                                                              
    at require (internal/module.js:20:19)                                                                             
    at Object.<anonymous> (C:\Users\Bronco\AppData\Roaming\npm\node_modules\nativescript\lib\nativescript-cli.js:14:18
    at Module._compile (module.js:570:32)                                                                             

Does anyone know how to solve this or give me a clue how to debug these kind of errors?



Somehow, nativescript-dev-android-snapshot in the dev-dependencies was bugging me and removing it did the job.