fixed path.join error when no `main` specified in `package.json`