You can activate a system property to enforce npm path layout. When activated, this system property will prevent, on all your npm repositories, uploading packages with file names that do not match the internal metadata of the package. This ensures that package uploads align with the package name in the artifact path across all your local npm repositories.
Activate this system property as follows:
artifactory.npm.enforce.path=true
Note
Enforcing npm path layout is not backward compatible and is applied only to npm packages that are uploaded after the system property was activated. npm packages that were uploaded to Artifactory prior to activating this system property will continue to be stored in Artifactory even if the file name does not match the internal metadata of the package.