arco-design-vue icon indicating copy to clipboard operation
arco-design-vue copied to clipboard

yarn install, init 失败

Open peixin opened this issue 2 years ago • 6 comments

基本信息

  • 依赖包名 及 版本: @arco-design/[email protected]
  • 浏览器版本: chrome119.0.0.0

预期结果

正常 install, init, build

复现步骤

本机 yarn 1.22.21, node 20.6.1

clone 之后

yarn install 报了很多错,类似

YN0013: │ @lerna/github-client@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry ➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close at new NodeError (node:internal/errors:405:5) at PassThrough.onclose (node:internal/streams/end-of-stream:154:30) at PassThrough.emit (node:events:514:28) at emitCloseNT (node:internal/streams/destroy:132:10) at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

发现用的是 yarn 版本是3.0.2, yarnrc 里 yarnPath 指定的是个本地地址 .yarn/releases/yarn-berry.cjs 而这又和 package.json 里 devDependencies 里的 "yarn": "^1.22.10" 又不一样。

根据 https://github.com/arco-design/arco-design-vue/issues/47 尝试删除 yarn.lock 之后 install 问题依旧

继续尝试删除 yarnPath: .yarn/releases/yarn-berry.cjs 使用本地 yarn install 安装正常了。

然后 yarn run init 失败,报错如下

yarn run v1.22.21 $ lerna run build --stream --scope=@arco-design/{vite-plugin-arco-vue-docs,arco-vue-scripts} && lerna link && lerna run build --scope=@arco-design/arco-vue-docs-navbar && lerna run init --scope=@arco-design/web-vue lerna notice cli v4.0.0 lerna info versioning independent lerna notice filter including ["@arco-design/vite-plugin-arco-vue-docs","@arco-design/arco-vue-scripts"] lerna info filter [ lerna info filter '@arco-design/vite-plugin-arco-vue-docs', lerna info filter '@arco-design/arco-vue-scripts' lerna info filter ] lerna info Executing command in 2 packages: "yarn run build" @arco-design/vite-plugin-arco-vue-docs: $ tsc @arco-design/arco-vue-scripts: $ tsc && node copy-template.js @arco-design/arco-vue-scripts: src/scripts/docgen/utils/parse-interface.ts(62,31): error TS2345: Argument of type '{ displayName: string; exportName: string; props: PropDescriptor[]; }' is not assignable to parameter of type 'ComponentDoc'. @arco-design/arco-vue-scripts: Property 'tags' is missing in type '{ displayName: string; exportName: string; props: PropDescriptor[]; }' but required in type 'ComponentDoc'. @arco-design/arco-vue-scripts: error Command failed with exit code 2. @arco-design/arco-vue-scripts: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. lerna ERR! yarn run build exited 2 in '@arco-design/arco-vue-scripts' error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

很困惑了

peixin avatar Dec 02 '23 09:12 peixin