Error occurred: Cannot read property 'root' of undefined