verify dependency package.json path exists before requiring it