pre-commit 2.2.0 fails during environment installation for Prettier 2.0.4, due to a dependency error:
#15 0.424 [INFO] Initializing environment for https://github.com/prettier/prettier.
#15 9.104 [INFO] Installing environment for https://github.com/prettier/prettier.
#15 9.105 [INFO] Once installed this environment will be reused.
#15 9.105 [INFO] This may take a few minutes...
#15 59.61 An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/repoaojfpcqy/node_env-default/bin/node', '/root/.cache/pre-commit/repoaojfpcqy/node_env-default/bin/npm', 'install')
#15 59.61 return code: 1
#15 59.61 expected return code: 0
#15 59.61 stdout: (none)
#15 59.61 stderr:
#15 59.61 npm WARN deprecated json-parser@1.1.5: `json-parser` is deprecated. Please use `comment-json` instead
#15 59.61 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
#15 59.61 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
#15 59.61 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
#15 59.61 npm ERR! code ETARGET
#15 59.61 npm ERR! notarget No matching version found for @glimmer/interfaces@^0.50.3.
#15 59.61 npm ERR! notarget In most cases you or one of your dependencies are requesting
#15 59.61 npm ERR! notarget a package version that doesn't exist.
#15 59.61 npm ERR! notarget
#15 59.61 npm ERR! notarget It was specified as a dependency of '@glimmer/util'
#15 59.61 npm ERR! notarget
#15 59.61
#15 59.61 npm ERR! A complete log of this run can be found in:
#15 59.61 npm ERR! /root/.npm/_logs/2020-04-15T14_56_13_637Z-debug.log
#15 59.61
#15 59.61 Check the log at /root/.cache/pre-commit/pre-commit.log
Prettier 2.0.4 installs fine from yarn:
$ yarn init --yes
$ yarn add --dev prettier 347ms ξ³ 17:00
yarn add v1.22.4
info No lockfile found.
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π¨ Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
ββ prettier@2.0.4
info All dependencies
ββ prettier@2.0.4
β¨ Done in 0.49s.