Npm Install Parameters

This may be slightly off-topic, but there are a few npm commands that use console.log, which bypasses the npmlog and --loglevel functionality. Once example is npm.view, which has 3 parameters in the signature, but the command-line interface, htrough the npm.commandCache always sends 2 parameters: args and cb. The code handles this gracefully by defaulting silent to false in all cases. Other functions that use a second, un-passable 'silent' parameter:
outdated
bin
pack
prefix
root
search
shrinkwrap
version
whoami
In my case, I'm calling npm.view programmatically, and I'm getting the console.log of the package info, though I don't want to display it.

Npm Install Command Not Working

Npm

Npm Install Command Not Found

I understand many of these functionalities are inherently output-oriented, and generally should output information, but that should be the reponsibility of the CLI layer. I could refactor some of these 'output from API' as a pull-request.

Npm Install Command Failed

If there's a simpler way to call npm.view and also pass in 'true' for the silent parameter, that would be helful. I'd rather not mess with the internals of the npm command cache.

Npm Install

JFrog Artifactory and Npm Registires. You need to use the --registry parameter to specify the local repository into which you are publishing your package when using the npm publish command. Every npm install command will fetch packages from the npm repository specified above. The main problem is, when user call npm install module_name there are no way to specify desired runtime (or maybe I just don't know such way) to install/build script. The main question is, is it possible implement passing config parameters to npm install for example same way at it possible now for npm run-scripts?

Comments are closed.