Я обнаружил, что если я пытаюсь установить пакет npm для поддержки изменений выходных данных.
Вот пример, в котором я пытаюсь установить пакет ведения журнала:
C:\test2>npm i Logging
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning UNABLE_TO_VERIFY_LEAF_SIGNATURE: request to https://registry.npmjs.org/Logging failed, reason: unable to verify the first certificate
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN test2@1.0.0 No description
npm WARN test2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ Logging@1.0.1
added 3 packages, removed 2 packages and updated 1 package in 6.93s
C:\test2>npm i Logging
npm WARN test2@1.0.0 No description
npm WARN test2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ Logging@1.0.1
added 1 package and removed 10 packages in 6.285s
C:\test2>npm i Logging
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
npm WARN test2@1.0.0 No description
npm WARN test2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
Последующие запуски после этого последнего все имели одинаковый вывод.
И вот пример установки bluebird:
C:\test2>npm i bluebird
npm WARN test2@1.0.0 No description
npm WARN test2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ bluebird@3.5.2
added 2 packages in 6.236s
C:\test2>npm i bluebird
npm WARN test2@1.0.0 No description
npm WARN test2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ bluebird@3.5.2
added 3 packages, removed 2 packages and updated 1 package in 6.056s
Обратите внимание, что даже если предупреждающие сообщения совпадают с числомКоличество добавленных пакетов может быть разным.
Каждая из этих повторяющихся установок была запущена за считанные секунды.Мне трудно поверить, что пакеты меняются между каждым вызовом.Так что же происходит?