установка зависимостей узла вручную - PullRequest
0 голосов
/ 04 октября 2019

Как я узнал из SO тем, зависимости для узла не устанавливаются автоматически на лету, начиная с npm версии 3. Я работаю в версии 3.5.2 и получаю эти предупреждения при запуске npm install --no-optional:

npm WARN eslint-config-react-app@5.0.2 requires a peer of @typescript-eslint/eslint-plugin@2.x but none was installed.
npm WARN eslint-config-react-app@5.0.2 requires a peer of @typescript-eslint/parser@2.x but none was installed.
npm WARN eslint-config-react-app@5.0.2 requires a peer of eslint@6.x but none was installed.
npm WARN ts-pnp@1.1.2 requires a peer of typescript@* but none was installed.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev

npm ERR! Missing: react-router-dom@^5.1.2
npm ERR! Invalid: lock file's @typescript-eslint/eslint-plugin@1.13.0 does not satisfy @typescript-eslint/eslint-plugin@2.8.0
npm ERR!

Как мне установить их вручную?

Я пытался:

npm install @typescript-eslint/eslint-plugin@2.*
npm install eslint@6.*
npm install typescript@*

, но это не помогло. Все еще выдает эти предупреждения.

Я получил немного дальше:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @typescript-eslint/eslint-plugin@^5.16.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'client'
npm ERR! notarget 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/mark/.npm/_logs/2019-10-04T20_26_24_111Z-debug.log

1 Ответ

1 голос
/ 04 октября 2019

Пожалуйста, используйте следующее для каждой зависимости между равноправными узлами, чтобы установить и удалить ошибку.

$ npm install --save-dev @typescript-eslint

Для другой ошибки:

No matching version found for @typescript-eslint/eslint-plugin@^5.16.0.

Пожалуйста, запустите npm view @typescript-eslint/eslint-plugin. Затем вы можете увидеть, что самой высокой версией @typecript-eslint / eslint-plugin является 2.3.2. Эта @typescript-eslint/eslint-plugin@^5.16.0 версия не существует.

...