alibaba / alibaba/formily-editor

请问yarn build报这个错,是什么原因?

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
172
Forks
28
PR merge metrics
No merged PRs in 30d

Description

yarn run v1.22.5
$ rimraf -rf packages/*/lib && lerna run build
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 2 packages: "npm run build"
lerna ERR! npm run build exited 2 in '@formily-editor/extensions'
lerna ERR! npm run build stdout:

> @formily-editor/extensions@1.0.0-alpha.2 build D:\formily-editor-master\formily-editor-master\packages\extensions
> tsc

../../node_modules/@types/react/index.d.ts(3057,14): error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
node_modules/@types/react/index.d.ts(3054,14): error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
node_modules/@types/react/index.d.ts(3067,13): error TS2717: Subsequent property declarations must have the same type. Property 'a' must be of type 'DetailedHTMLProps, HTMLAnchorElement>', but here has type 'DetailedHTMLProps, HTMLAnchorElement>'.
node_modules/@types/react/index.d.ts(3068,13): error TS2717: Subsequent property declarations must have the same type. Property 'abbr' must be of type 'DetailedHTMLProps, HTMLElement>', but here has type 'DetailedHTMLProps, HTMLElement>'.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `yarn build`, which runs `lerna run build` and fails in `packages/extensions` during `tsc`. Compare the two reported `@types/react/index.d.ts` locations and determine why `LibraryManagedAttributes` and JSX properties are declared twice; done means the extensions package builds without these TypeScript errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.