'How do I set "Configuration" options for "npm pack" commands?

Doc page https://docs.npmjs.com/cli/v8/commands/npm-pack has very useful configuration options. Right now I want to use config "pack-destination" per https://docs.npmjs.com/cli/v8/commands/npm-pack#pack-destination, but they give no invocation examples and no hint about how to make these settings.

I have tried setting "pack-destination" in my active npmrc file, via command-line switch "--pack-destination=dirpath" (with both relative and absolute paths), argument "pack-destination=dirpath". The first two have no effect. Last seems to be how you set some tags.



Solution 1:[1]

I'm not sure how exactly did you invoked the command-line, but I just used like this in my terminal with success:

npm pack --pack-destination="./dest"

relative path worked just fine

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcelo Cristiano Araujo Silva