Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: improve error for invalid package targets #32052

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Update lib/internal/errors.js
Co-Authored-By: Geoffrey Booth <GeoffreyBooth@users.noreply.github.com>
  • Loading branch information
MylesBorins and GeoffreyBooth authored Apr 21, 2020
commit 8e04ec1866c464c920537d12943b94b25efdf01f
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ E('ERR_INVALID_PACKAGE_TARGET',
} else if (key === '.') {
return `Invalid "exports" main target ${JSONStringify(target)} defined ` +
`in the package config ${pkgPath}${sep}package.json${relError ?
' - targets must start with "./"' : ''}`;
'; targets must start with "./"' : ''}`;
} else if (typeof target === 'string' && target !== '' &&
!StringPrototypeStartsWith(target, './')) {
return `Invalid "exports" target ${JSONStringify(target)} defined for '${
Expand Down