运行npm run bootstrap时报错:

 npm run bootstrap
> bootstrap
> lerna bootstrap --hoist --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 6 packages
lerna WARN EHOIST_PKG_VERSION "n8n-editor-ui" package depends on uuid@^8.1.0, which differs from the hoisted uuid@^3.4.0.
lerna WARN EHOIST_PKG_VERSION "n8n-node-dev" package depends on tmp-promise@^2.0.2, which differs from the hoisted tmp-promise@^3.0.2.
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna ERR! npm install exited 1 in 'n8n'
lerna ERR! npm install stderr:
lerna ERR! npm install exited 1 in 'n8n'
lerna ERR! npm install stderr:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: ts-node@8.10.2
npm ERR! node_modules/ts-node
npm ERR!   ts-node@"^8.9.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ts-node@">=9.0.0" from jest-config@26.6.3
npm ERR! node_modules/jest-config
npm ERR!   jest-config@"^26.6.3" from @jest/core@26.6.3
npm ERR!   node_modules/@jest/core
npm ERR!     @jest/core@"^26.6.3" from jest@26.6.3
npm ERR!     node_modules/jest
npm ERR!       jest@"^26.4.2" from the root project
npm ERR!       1 more (ts-jest)
npm ERR!     1 more (jest-cli)
npm ERR!   jest-config@"^26.6.3" from jest-cli@26.6.3
npm ERR!   node_modules/jest-cli
npm ERR!     jest-cli@"^26.6.3" from jest@26.6.3
npm ERR!     node_modules/jest
npm ERR!       jest@"^26.4.2" from the root project
npm ERR!       1 more (ts-jest)
npm ERR!   2 more (jest-runner, jest-runtime)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/h/.npm/eresolve-report.txt for a full report.
发布于 2020-11-24 15:33
共1个回答
AD
游客AdtNgf

本质上,这是因为你使用的是Node15(附带了NPM 7),在处理对等依赖关系的方式上带来了巨大的变化。

一个快速的解决办法是运行  npm config set legacy-peer-deps true ,让npm以“旧方式”处理对等依赖。

回答问题