ajaxorg / ajaxorg/ace

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

オープン
#5,899 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。