pnpm install
Aliases: i
pnpm install is used to install all dependencies for a project.
У середовищі CI встановлення не вдається, якщо файл блокування присутній, але потребує оновлення.
Inside a workspace, pnpm install installs all dependencies in all the
projects. If you want to disable this behavior, set the recursive-install
setting to false.
TL;DR
| Команда | Значення | 
|---|---|
| pnpm i --offline | Встановити оффлайн, тільки зі сховища | 
| pnpm i --frozen-lockfile | pnpm-lock.yamlis not updated | 
| pnpm i --lockfile-only | Only pnpm-lock.yamlis updated | 
Параметри
--force
Примусове перевстановлення залежностей: перезавантаження пакунків, змінених у сховищі, перестворення файлу блокування та/або теки модулів, створених несумісною версією pnpm. Install all optionalDependencies even they don't satisfy the current environment(cpu, os, arch).
--offline
- Default: false
- Type: Boolean
If true, pnpm will use only packages already available in the store.
Якщо пакунок не буде знайдено локально, встановлення завершиться невдачею.
--prefer-offline
- Default: false
- Type: Boolean
If true, staleness checks for cached data will be bypassed, but missing data
will be requested from the server. To force full offline mode, use --offline.
--prod, -P
- Стандартно:
- If NODE_ENVisproduction:true
- If NODE_ENVis notproduction:false
 
- If 
- Type: Boolean
If set, pnpm will ignore NODE_ENV and instead use this boolean value for
determining the environment.
If true, pnpm will not install any package listed in devDependencies and will remove
those insofar they were already installed.
If false, pnpm will install all packages listed in devDependencies and dependencies.
--dev, -D
Only devDependencies are installed and dependencies are removed insofar they
were already installed, regardless of the NODE_ENV.
--no-optional
optionalDependencies are not installed.
--lockfile-only
- Default: false
- Type: Boolean
When used, only updates pnpm-lock.yaml and package.json. Nothing gets written to the node_modules directory.
--fix-lockfile
Автоматично виправити пошкоджені записи файлу блокування.
--frozen-lockfile
- Стандартно:
- For non-CI: false
- For CI: true, if a lockfile is present
 
- Type: Boolean
If true, pnpm doesn't generate a lockfile and fails to install if the lockfile
is out of sync with the manifest / an update is needed or no lockfile is
present.
This setting is true by default in CI environments. Для виявлення середовищ CI використовується наступний код:
exports.isCI = !!(
  env.CI || // Travis CI, CircleCI, Cirrus CI, GitLab CI, Appveyor, CodeShip, dsari
  env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
  env.BUILD_NUMBER || // Jenkins, TeamCity
  env.RUN_ID || // TaskCluster, dsari
  exports.name ||
  false
)
--merge-git-branch-lockfiles
Обʼєднання всіх файлів блокування гілок git. Read more about git branch lockfiles.
--reporter=<name>
- Стандартно:
- For TTY stdout: default
- For non-TTY stdout: append-only
 
- Type: default, append-only, ndjson, silent
Дозволяє вибрати репортера, який записуватиме у термінал налагоджувальну інформацію про хід встановлення.
- silent - no output is logged to the console, not even fatal errors
- default - the default reporter when the stdout is TTY
- append-only - the output is always appended to the end. Жодні маніпуляції з курсором не виконуються
- ndjson - the most verbose reporter. Prints all logs in ndjson format
If you want to change what type of information is printed, use the loglevel setting.