Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
4.5 KiB

  1. npm-doctor(1) -- Check your environments
  2. ========================================================
  3. ## SYNOPSIS
  4. npm doctor
  5. ## DESCRIPTION
  6. `npm doctor` runs a set of checks to ensure that your npm installation has
  7. what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does
  8. have some basic requirements that must be met:
  9. + Node.js and git must be executable by npm.
  10. + The primary npm registry, `registry.npmjs.com`, or another service that uses
  11. the registry API, is available.
  12. + The directories that npm uses, `node_modules` (both locally and globally),
  13. exist and can be written by the current user.
  14. + The npm cache exists, and the package tarballs within it aren't corrupt.
  15. Without all of these working properly, npm may not work properly. Many issues
  16. are often attributable to things that are outside npm's code base, so `npm
  17. doctor` confirms that the npm installation is in a good state.
  18. Also, in addition to this, there are also very many issue reports due to using
  19. old versions of npm. Since npm is constantly improving, running `npm@latest` is
  20. better than an old version.
  21. `npm doctor` verifies the following items in your environment, and if there are
  22. any recommended changes, it will display them.
  23. ### `npm ping`
  24. By default, npm installs from the primary npm registry, `registry.npmjs.org`.
  25. `npm doctor` hits a special ping endpoint within the registry. This can also be
  26. checked with `npm ping`. If this check fails, you may be using a proxy that
  27. needs to be configured, or may need to talk to your IT staff to get access over
  28. HTTPS to `registry.npmjs.org`.
  29. This check is done against whichever registry you've configured (you can see
  30. what that is by running `npm config get registry`), and if you're using a
  31. private registry that doesn't support the `/whoami` endpoint supported by the
  32. primary registry, this check may fail.
  33. ### `npm -v`
  34. While Node.js may come bundled with a particular version of npm, it's the
  35. policy of the CLI team that we recommend all users run `npm@latest` if they
  36. can. As the CLI is maintained by a small team of contributors, there are only
  37. resources for a single line of development, so npm's own long-term support
  38. releases typically only receive critical security and regression fixes. The
  39. team believes that the latest tested version of npm is almost always likely to
  40. be the most functional and defect-free version of npm.
  41. ### `node -v`
  42. For most users, in most circumstances, the best version of Node will be the
  43. latest long-term support (LTS) release. Those of you who want access to new
  44. ECMAscript features or bleeding-edge changes to Node's standard library may be
  45. running a newer version, and some of you may be required to run an older
  46. version of Node because of enterprise change control policies. That's OK! But
  47. in general, the npm team recommends that most users run Node.js LTS.
  48. ### `npm config get registry`
  49. Some of you may be installing from private package registries for your project
  50. or company. That's great! Others of you may be following tutorials or
  51. StackOverflow questions in an effort to troubleshoot problems you may be
  52. having. Sometimes, this may entail changing the registry you're pointing at.
  53. This part of `npm doctor` just lets you, and maybe whoever's helping you with
  54. support, know that you're not using the default registry.
  55. ### `which git`
  56. While it's documented in the README, it may not be obvious that npm needs Git
  57. installed to do many of the things that it does. Also, in some cases
  58. – especially on Windows – you may have Git set up in such a way that it's not
  59. accessible via your `PATH` so that npm can find it. This check ensures that Git
  60. is available.
  61. ### Permissions checks
  62. * Your cache must be readable and writable by the user running npm.
  63. * Global package binaries must be writable by the user running npm.
  64. * Your local `node_modules` path, if you're running `npm doctor` with a project
  65. directory, must be readable and writable by the user running npm.
  66. ### Validate the checksums of cached packages
  67. When an npm package is published, the publishing process generates a checksum
  68. that npm uses at install time to verify that the package didn't get corrupted
  69. in transit. `npm doctor` uses these checksums to validate the package tarballs
  70. in your local cache (you can see where that cache is located with `npm config
  71. get cache`, and see what's in that cache with `npm cache ls` – probably more
  72. than you were expecting!). In the event that there are corrupt packages in your
  73. cache, you should probably run `npm cache clean` and reset the cache.
  74. ## SEE ALSO
  75. * npm-bugs(1)
  76. * npm-help(1)
  77. * npm-ping(1)