Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build npm docs #30719

Closed
hinell opened this issue Nov 29, 2019 · 8 comments
Closed

Build npm docs #30719

hinell opened this issue Nov 29, 2019 · 8 comments
Labels
npm Issues and PRs related to the npm client dependency or the npm registry.

Comments

@hinell
Copy link

hinell commented Nov 29, 2019

  • Version: v13.2.0
  • Platform: Windows 10 x64
  • Subsystem:

Issue

Running npm help install throws an error:

Windows cannot find
'E:\Programs\NodeJS\node_modules\npm\docs\public\cli-commands\npm-install\index.html'. 

The error is caused by non-existing public/ folder in default NodeJS path installation: NodeJS/node_modules/npm/docs/public , which contains local npm documentation.

Addressing

  1. cd to deps/npm/docs folder
  2. build documentation by using default npm scripts

Workaround

$ npm i -g npm

Background

  • NPM documentation was recently updated by v6.13.0 version to use Gatsby framework, which requires users to generate static documentation from * .md files before it can be consumed
  • Newly updated npm was incorporated into NodeJS by v13.2.0 (deps: update npm to 6.13.0 #30271) version

Misc

CC @ruyadorno

Why not to convert the deps/npm to a git submodule?

@ruyadorno
Copy link
Member

I know #30533 landed last week on master with a bunch of npm docs fixes - the fact that npm i -g npm is a workaround leads me to think that the issue has probably been solved but I don't have a windows setup in hand to confirm that right now

@hinell
Copy link
Author

hinell commented Dec 2, 2019

Well when you run npm i -g npm it gets its documentation from the global C:\Users\UserName\AppData\Roaming\npm\node_modules\npm\docs\public folder.
The latter is located outside of the default NodeJS/ installation path on the Windows systems that is `Program Files\NodeJS.

If you run npm un -g npm the problem will return back.

In other words running $ [...]/NodeJS/npm help <...> will always throw error.

@ruyadorno
Copy link
Member

hi @hinell thanks for digging into this 😊 something that would be amazing to confirm if the problem has been solved already is to compile the latest node from current master and see if it still has the same error on $ [...]/NodeJS/npm help <...> from v13.2.0 when executing the compiled version from current master containing all the fixes that landed in #30533

@hinell
Copy link
Author

hinell commented Dec 2, 2019

@ruyadorno Well as long as there there is no pre-generated deps/npm/docs/public/ folder, the problem ain't gonna disappear. 🤔
By far, neither of revisions contain it, even the most fresh one - master:

@richardlau
Copy link
Member

richardlau commented Dec 3, 2019

It's a bug in npm's Makefile -- the release target depends on doc but this was replaced by docs by npm/cli#274:

release: gitclean ls-ok markedclean marked-manclean docs-clean doc

This meant that anyone following the Maintaining npm in Node.js guide would run make release but this would not build the docs.

I've submitted npm/cli#546.

cc @nodejs/npm

@richardlau richardlau added the npm Issues and PRs related to the npm client dependency or the npm registry. label Dec 3, 2019
@hinell
Copy link
Author

hinell commented Dec 3, 2019

@richardlau Well yeah. That's must be the root of the problem. I wonder how they did release docs without using make now...

anyone following the [...] guide

Didn't know these guides exist. They aren't linked from CONTRIBUTING.md.
This is probably subject for another issue. 😉

@ruyadorno
Copy link
Member

thank you so much @hinell for finding this out and @richardlau for promptly submitting a fix, the timing is great since we have a release scheduled for today, I'll make sure to follow up there 👍

@richardlau
Copy link
Member

All supported Node.js release lines now include npm 6.13.4 so this should be fixed (the fix went into npm 6.13.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants