Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Build 报错 #1913

Closed
Dogtiti opened this issue Sep 25, 2023 · 5 comments
Closed

bug: Build 报错 #1913

Dogtiti opened this issue Sep 25, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Dogtiti
Copy link

Dogtiti commented Sep 25, 2023

Versions

  • dumi: ^2.2.7
  • node: v18.16.1
  • npm: v9.5.1
  • OS: MacOS
  • Browser: Chrome

Steps to reproduce

error - .dumi/tmp/core/history.ts:9:17 - TS2742: The inferred type of 'createHistory' cannot be named without a reference to '.pnpm/history@5.3.0/node_modules/history'. This is likely not portable. A type annotation is necessary.
error - .dumi/tmp/core/history.ts:9:17 - TS2742: The inferred type of 'createHistory' cannot be named without a reference to '.pnpm/history@5.3.0/node_modules/history'. This is likely not portable. A type annotation is necessary.
error - Error: Declaration generation failed.
    at getDeclarations (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/builder/bundless/dts/index.js:166:19)
    at transformFiles (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/builder/bundless/index.js:79:58)
    at async bundless (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/builder/bundless/index.js:107:19)
    at async builder (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/builder/index.js:47:25)
    at async Command.fn (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/commands/build.js:15:13)
    at async Service.run (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/@umijs+core@4.0.80/node_modules/@umijs/core/dist/service/service.js:328:15)
    at async Service.run2 (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/service/service.js:58:16)
    at async Object.run (/Users/liurui/workspace/dogtiti/xx/node_modules/.pnpm/father@4.3.3_@types+node@20.4.7_styled-components@6.0.7_webpack@5.88.2/node_modules/father/dist/cli/cli.js:37:9)
 ELIFECYCLE  Command failed with exit code 1.

What is Expected?

What is actually happening?

@Dogtiti Dogtiti added the bug Something isn't working label Sep 25, 2023
@PeachScript
Copy link
Member

Duplicate of umijs/father#710 (comment)

@PeachScript PeachScript marked this as a duplicate of umijs/father#710 Sep 25, 2023
@PeachScript
Copy link
Member

升级 father 和 dumi 到最新版即可

@PeachScript PeachScript closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2023
@Dogtiti
Copy link
Author

Dogtiti commented Sep 25, 2023

@PeachScript 可以把脚手架模版也升级一下,现在默认创建出来的模版不是最新的

@PeachScript
Copy link
Member

我这里试了下是新的,你的 create-dumi 是否是旧版本,我的初始化方式:

$ pnpm dlx create-dumi # 选 React 模板一路往下
$ cat tsconfig.json # include 里没有 .dumi/**/*

@Dogtiti
Copy link
Author

Dogtiti commented Sep 25, 2023

我大概知道了,可能是我前段时间创建的项目,那时还没有升级father,今天再试了一下是最新的了 ,那就没问题了,多谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants