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

prebundle errors #611

Open
PeachScript opened this issue Jun 29, 2022 · 4 comments
Open

prebundle errors #611

PeachScript opened this issue Jun 29, 2022 · 4 comments

Comments

@PeachScript
Copy link
Member

PeachScript commented Jun 29, 2022

os-locale/@mdx-js/mdx 在 ncc 编译时报错

关联包:@umijs/preset-umi@umijs/plugin-docs
✅ 解法:降级 @vercel/ncc0.33.3,真正原因待排查

Error: For the selected environment is no default ESM chunk format available:
ESM exports can be chosen when 'import()' is available.
JSONP Array push can be chosen when 'document' is available.
Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.

@types/less/@babel/* 在 api-extractor 执行时报错

关联包:@umijs/bundler-utils
❓解法:暂无,但似乎不影响使用

Error: /path/to/node_modules/.pnpm/@types+less@3.0.3/node_modules/@types/less/index.d.ts:280:13 - (ae-forgotten-export) The symbol "LessStatic" needs to be exported by the entry point index.d.ts
Error: /path/to/node_modules/.pnpm/@babel+parser@7.18.5/node_modules/@babel/parser/typings/babel-parser.d.ts:101:3 - (ae-forgotten-export) The symbol "ParserPlugin" needs to be exported by the entry point index.d.ts
Error: /path/to/node_modules/.pnpm/@babel+types@7.17.0/node_modules/@babel/types/lib/index.d.ts:8:1 - (ae-forgotten-export) The symbol "BaseComment" needs to be exported by the entry point index.d.ts

api-extractor 无法处理 export = 语法

关联包:rollup-plugin-copy
✅ 解法:api-extractor 暂无支持 export = 的打算(microsoft/rushstack#2220 ),所以 father 对 api-extractor 做了 patch,将 export = 语法用 AST 预处理成 ES Module 再交给 api-extractor 处理,umijs/father-next@f2c9223

error - InternalError: Internal Error: Unable to analyze the export "Options" in
/path/to/node_modules/.pnpm/fast-glob@3.2.11/node_modules/fast-glob/out/index.d.ts

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.

api-extractor 无法处理 export * from '外部模块'

关联包:@types/fs-extra
解法:尝试提了 PR,等 rushstack 答复,microsoft/rushstack#3528

InternalError: Internal Error: getResolvedModule() could not resolve module name "fs"
@txp1035
Copy link
Member

txp1035 commented Jul 29, 2022

  1. esm包报错,回退版本到cjs版本先用着
    image
  2. 这个报错但不影响使用
    image
    先记录问题,再解决。
    我也遇到了,貌似0.33.3也不行
    只要是纯esm包就会包这个错误

@PeachScript PeachScript transferred this issue from umijs/father-next Mar 28, 2023
@PeachScript PeachScript changed the title prebundle errors in Umi 4 prebundle errors May 18, 2023
@PeachScript
Copy link
Member Author

dayjs 及 globby 预打包失败:#650

@fz6m
Copy link
Contributor

fz6m commented May 18, 2023

os-locale / @mdx-js/mdx / dayjs / globby 这些都可以在 dora 打包成功,可以尝试下是不是缺少一个 esm: false 的参数。

@beliefgp
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants