You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux, npm help json displays correctly man/man5/npm-json.
On Windows, npm help json attempts to display the corresponding HTML page which leads to the following error:
PS C:\GitHub\npm\cli> npm help json
npm ERR! code 1
npm ERR!command failed
npm ERR!command C:\Windows\system32\cmd.exe /d /s /c start "" file:///C:^%5Cnvm^%5Cv20.11.1^%5Cnode_modules^%5Cnpm^%5Cdocs^%5Coutput^%5Cconfiguring-npm^%5Cnpm-json.html
npm ERR! The system cannot find the file file:///C:%5Cnvm%5Cv20.11.1%5Cnode_modules%5Cnpm%5Cdocs%5Coutput%5Cconfiguring-npm%5Cnpm-json.html.
npm help global has the same problem.
Expected Behavior
npm help json and npm help global should display the same documentation on Windows as on Linux
Steps To Reproduce
Any Windows version, npm 8 or higher
Run npm help json
See error
Cause:
The build process duplicates two man pages (package-json -> npm-json, folders -> npm-global). However, it does not duplicate the html pages. Therefore, npm help json won't find any HTML version of the duplicated man pages:
On Windows, `npm help json` and `npm help global` attempt to display
`npm-json.html` and `npm-global.html` files which leads to an error
because these files have not been generated.
This pull request duplicates the `package-json.md` and `folders.md`
files in order to generate these files and make the above-mentioned
commands functional.
Closes: #7374
Co-authored-by: Luke Karrys <luke@lukekarrys.com>
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
On Linux,
npm help json
displays correctlyman/man5/npm-json
.On Windows,
npm help json
attempts to display the corresponding HTML page which leads to the following error:npm help global
has the same problem.Expected Behavior
npm help json
andnpm help global
should display the same documentation on Windows as on LinuxSteps To Reproduce
npm help json
Cause:
The build process duplicates two man pages (
package-json
->npm-json
,folders
->npm-global
). However, it does not duplicate thehtml
pages. Therefore,npm help json
won't find any HTML version of the duplicated man pages:cli/docs/lib/build.js
Lines 96 to 118 in 9622597
man:
html:
Possible solution:
Environment
The text was updated successfully, but these errors were encountered: