Update package.js

Hello! I found filepath not defined variable causing an exception and not registering available packages. Changed it by dir and all worked OK.