fix error name
use semver.valid to parse dependencies properly