Issue 1:
What / Why

I tried to install electron using npm install --save-dev electron, and npm gave me this(and something like rollbackFailedOptional for a moment before). Cleaning cache doesn't fix the problem.

Versions: Ubuntu 19.10, node v12.13.1(from sudo n stable after updated npm), npm 6.12.1(from sudo npm install npm@latest -g with npm 5.8.0 and node v10.15.2 from apt)

When

Whenever I install something using npm, but sudo npm install npm@latest -g works normally.

Where

npm public registry?

How

Current Behavior

Here:

x7f178735@x7f178735-desktop:~/electron-test$ npm install --save-dev electron

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:

npm ERR! /home/x7f178735/.npm/_logs/2019-12-08T10_33_15_026Z-debug.log

2019-12-08T10_43_02_816Z-debug.log is here:

0 info it worked if it ends with ok

1 verbose cli [

1 verbose cli '/usr/local/bin/node',

1 verbose cli '/usr/local/bin/npm',

1 verbose cli 'install',

1 verbose cli '--save-dev',

1 verbose cli 'electron'

1 verbose cli ]

2 info using npm@6.12.1

3 info using node@v12.13.1

4 verbose npm-session d4ceea4abcc76540

5 silly install loadCurrentTree

6 silly install readLocalPackageData

7 timing npm Completed in 16597ms

8 error cb() never called!

9 error This is an error with npm itself. Please report this error at:

10 error https://npm.community

Steps to Reproduce

Just simply type npm install --save-dev electron and press ENTER in Terminal.

Expected Behavior

I can't describe the normal behavior exactly(install successfully?), but I know it shouldn't be like this.

Who

n/a

References

Really a lot of similar issues here.

PS: Please forgive my terribly poor English. I am an amateur programming enthusiast(just googled for this word) in China and a High School student with a not high English mark.

PS2: Reporting a bug(?) is sometime even troublesome than programming. I've spent about 1 hour writing this issue.

Issue 2:
Updated

See #5302.

The discussion went in unhelpful directions. #5302 replaces this issue.

Original

Is there an existing issue for this?

I have searched the existing issues

This issue exists in the latest npm version

I am using the latest npm

Current Behavior

If I run the config command to set my name, I get a confusing and misleading warning:

mv ~/.npmrc ~/".npmrc.$(date '+%F_%H.%M.%S').bak"

npm config set init.author.name "AJ ONeal"

npm WARN config init.author.name Use `--init-author-name` instead.

So then if I try again a few different ways:

npm config set --init-author-name "AJ ONeal"

npm config --init-author-name "AJ ONeal"

I get usage errors:

npm ERR! code EUSAGE

And if I try the simplest form I can think of:

npm --init-author-name "AJ ONeal"

I get yet a different usage error:

npm <command>

Usage:

...

And I can try putting --init-author-name in .npmrc, but this also doesn't work:

--init-author-name="AJ ONeal"
--init-author-email="coolaj86@gmail.com"

These are all ignored on npm init.

Keywords for the sake of SEO and people trying to search for this in the GitHub tool:

init.author.name

init-author-name

--init-author-name

init.author.email

init-author-email

--init-author-email

init.author.url

init-author-url

--init-author-url

init.license

init-license

--init-license

init.version

init-version

--init-version

Expected Behavior

Either the built-in documentation should be updated to give the output the corresponds to the expected input

Or the parsing should change to allow the given output as input in some way

Steps To Reproduce

As shown above.

Environment

npm: 8.11.0

Node.js: v16.16.0

OS Name: macOS

System Model Name:

npm config:

; N/A