ajaxorg / ajaxorg/ace

(ace-builds): declares 'ace-builds-internal' but cannot import

未關閉
#5,899 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug p2
主要語言
JavaScript
星號
27.1k
分支
5.3k
PR 合併指標
30 天內沒有已合併 PR

描述

### Describe the bug

ace-builds declares `ace-builds-internal` but you cannot actually use it. I'm trying to implement a piece of Ace into Typescript and deepCopy is used by text_highlight_rules.

Image

And while its perfectly valid to TypeScript, compiling does not detect it at all.
```
ERROR in ./packages/tgui/components/Ace/languages/text_highlight_rules.ts 5:17-61
Module not found: Error: Can't resolve 'ace-builds-internal/lib/deep_copy' in '/home/chen/development/monkestation2.0/tgui/packages/tgui/components/Ace/languages'
resolve 'ace-builds-internal/lib/deep_copy' in '/home/chen/development/monkestation2.0/tgui/packages/tgui/components/Ace/languages'
Parsed request is a module
using description file: /home/chen/development/monkestation2.0/tgui/packages/tgui/package.json (relative path: ./components/Ace/languages)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
request is not managed by the pnpapi
Your application tried to access ace-builds-internal, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: ace-builds-internal
Required by: /home/chen/development/monkestation2.0/tgui/packages/tgui/components/Ace/languages/
@ ./packages/tgui/components/Ace/languages/ntsl.ts 6:28-61
@ ./packages/tgui/components/Ace/Editor.tsx 12:12-39
@ ./packages/tgui/interfaces/NTSLCoding.tsx 8:14-49
@ ./packages/tgui/interfaces/ sync ^\.\/.*$ ./NTSLCoding ./NTSLCoding.tsx
@ ./packages/tgui/routes.tsx 16:23-54
@ ./packages/tgui/index.tsx 53:17-36 83:4-85:6

```

### Expected Behavior

Expected the `ace-builds-internal` to be an actual import.

### Current Behavior

see above

### Reproduction Steps

install ace-builds,
try to import and use deepCopy, and compile with it.
```
import { deepCopy } from 'ace-builds-internal/lib/deep_copy';
```

### Possible Solution

actually expose the declared modules or dont declare them at all.

### Additional Information/Context

_No response_

### Ace Version / Browser / OS / Keyboard layout

1.43.5 / Debian 12.11 / US

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。