This is the warning you get from NPM whenever the name you set in your package.json doesn't follow the laid-out conventions [β]. You can still go ahead and name your package whatever you like, but I imagine following the convention ensures you don't run into unforeseen issues.
The Naming convention:
Please note the rules below might change in the future, but at the time of writing if the regex in the warning matches
"^(?:(?:@(?:[a-z0-9-*~][a-z0-9-*._~]*)?/[a-z0-9-._~])|[a-z0-9-~])[a-z0-9-._~]*$"
then following the conventions below should work for you.
Basic naming rules:
- A package name should be in lowercase.
- It can contain alphanumeric characters (
a-z
,0-9
), dashes (-
), periods (.
), and underscores (_
). - Names cannot start with special characters (like
@
,-
, or_
) unless itβs a scoped package. Valid examples:my-package
,package123
,another.package_name
Scoped Packages:
- When using a scoped package (like
@scope/package-name
), the scope should also follow the lowercase rule. - Scoped packages must start with an
@
symbol, followed by lowercase letters, numbers, dashes, or underscores. Valid examples:@scope/package-name
,@my-org/my_package
- When using a scoped package (like
Here is another article you might like π Creating A Browser-based Interactive Terminal (Using XtermJS And NodeJS)