You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is a list of rules that valid npm package name should conform to.
package name length should be greater than zero
all the characters in the package name must be lowercase i.e., no uppercase or mixed case names are allowed
package name can consist of hyphens
package name must not contain any non-url-safe characters (since name ends up being part of a URL)
package name should not start with . or _
package name should not contain any spaces
package name should not contain any of the following characters: ~)('!*
package name cannot be the same as a node.js/io.js core module nor a reserved/blacklisted name. For example, the following names are invalid:
http
stream
node_modules
favicon.ico
package name length cannot exceed 214
I couldn't find this in the npm docs to reference.
Simplest change for my particular issue would be allowing the . in the name after the scope so that @scope/com.example.packageid passed the regex
^(@[a-z0-9-]+/)?[a-z0-9-.]+$
The text was updated successfully, but these errors were encountered:
The --name validator regex is too restrictive and will not let valid package names pass validation.
Presume it was a legacy versus current package name issue.
https://github.com/npm/validate-npm-package-name has a list of valid package name defined as:
Naming Rules
Below is a list of rules that valid npm package name should conform to.
package name length should be greater than zero
all the characters in the package name must be lowercase i.e., no uppercase or mixed case names are allowed
package name can consist of hyphens
package name must not contain any non-url-safe characters (since name ends up being part of a URL)
package name should not start with . or _
package name should not contain any spaces
package name should not contain any of the following characters: ~)('!*
package name cannot be the same as a node.js/io.js core module nor a reserved/blacklisted name. For example, the following names are invalid:
http
stream
node_modules
favicon.ico
package name length cannot exceed 214
I couldn't find this in the npm docs to reference.
Simplest change for my particular issue would be allowing the . in the name after the scope so that @scope/com.example.packageid passed the regex
^(@[a-z0-9-]+/)?[a-z0-9-.]+$
The text was updated successfully, but these errors were encountered: