Repository navigation
[Bug] Cordis loader fails to import a valid ESM plugin entry point (failed to import) #10475
Replies: 3 comments
|
The manifest in the post does not match the repository currently being installed: the current |
|
Hi Barry, I have tried all your suggestions, but the plugin still fails to import. Here is what I've done so far:
To prove the code is completely valid, I ran This appears to be a fundamental issue with how the Cordis loader resolves modules in the Windows Desktop client, regardless of the entry point or module system used. Could you please check if there's a module resolution bug in the Windows build? Thanks for your help. |
|
I checked the current repo, and your root One thing I'd try is bypassing the Desktop repository-plugin installation path and installing it as a regular DSH bundle: dsh plugin --profile web add github:JiamingShi-JsPhys/chelate-shell
dsh --profile web --dump-configThe official DSH docs support this bundle installation flow, and your repo already has the If it loads this way but still fails through the Desktop plugin panel, that would point toward the repository-plugin loader rather than your entry module. If both fail, the underlying import exception would be the next thing to inspect. The current |
Uh oh!
There was an error while loading. Please reload this page.
Environment:
https://github.com/JiamingShi-JsPhys/chelate-shellDescribe the bug:
The DSH Desktop client successfully installs the plugin and displays it in the plugin list. However, every time the client starts, it throws a warning:
启用失败: dsh: warning: 1 entry did not activate chelate-shell (chelate-shell): failed to import. The plugin status remains "Not Running" (未运行).Troubleshooting & Evidence:
To isolate the issue, I have performed the following verifications:
node .dsh-plugin/index.js) executes perfectly with zero errors.module.exports) and pure ESM (export function apply). Both result in the samefailed to importerror.node_modules,pnpm-lock.yaml, and bumping the plugin version to force a clean reinstall. The issue persists.Expected behavior:
The Cordis loader should successfully import the
index.jsfile and activate the plugin on startup.Actual behavior:
The plugin fails to import and remains inactive.
Relevant Code Snippets:
package.json:{ "name": "chelate-shell", "version": "1.0.0", "type": "module", "main": ".dsh-plugin/index.js", "exports": { ".": "./.dsh-plugin/index.js" }, "files": [ ".dsh-plugin/index.js", "cordis.patch.yml", "skills/" ], "dsh": { "bundle": { "patch": "./cordis.patch.yml" } } }cordis.patch.yml:.dsh-plugin/index.js(Minimal reproduction):Additional Context:
It appears there might be an issue with how the Cordis loader resolves the
exportsfield or handles ESM syntax in Windows environments for Git-installed plugiAll reactions