npm-cli-login
npm-cli-login copied to clipboard
Does not work on windows anymore
Try to run it on a Windows Bamboo agent and the config-path does not work anymore...
error 20-Feb-2018 09:28:19 TypeError: Path must be a string. Received undefined
error 20-Feb-2018 09:28:19 at assertPath (path.js:7:11)
error 20-Feb-2018 09:28:19 at Object.join (path.js:468:7)
error 20-Feb-2018 09:28:19 at Object.processArguments (E:\bamboo\remoteagent\xml-data\build-dir\UXATEC-CSDR-JOB1\node_modules\npm-cli-login\lib\login.js:34:56)
error 20-Feb-2018 09:28:19 at module.exports (E:\bamboo\remoteagent\xml-data\build-dir\UXATEC-CSDR-JOB1\node_modules\npm-cli-login\lib\index.js:4:25)
error 20-Feb-2018 09:28:19 at login (E:\bamboo\remoteagent\xml-data\build-dir\UXATEC-CSDR-JOB1\node_modules\npm-cli-login\bin\npm-cli-login.js:30:19)
error 20-Feb-2018 09:28:19 at Object.
When setting the path to --config-path "./.npmrc" trying to connect to the repository behind a proxy fails with
error 21-Feb-2018 16:37:38 info attempt registry request try #1 at 4:37:38 PM error 21-Feb-2018 16:37:38 http request PUT https://**********com/repository/npm-all/-/user/org.couchdb.user:******as error 21-Feb-2018 16:37:40 info retry will retry, error on last attempt: Error: connect ECONNREFUSED ...:443
I have the same problem
I have this problem as well.
I have this problem too. I thought that npm was modern and supported. This is not true? It has bugs? A simple command like this is unsupported and bug reports are ignored?! This is unexpected and not entirely pleasing. No one in the npm community cares? Wow.
As a workaround, you can do
if (!process.env.HOME) {
process.env.HOME = require('os').homedir();
}
before calling
require('npm-cli-login')('name', 'password');
on Windows.
@kittaakos this works for me, thanks
Can we have a fix implemented for this, still not fixed and annoying to use.