Refactoring repository to resolve npm install error