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] Command not found after updating #24

Closed
pilgrimlyieu opened this issue Nov 3, 2023 · 0 comments
Closed

[BUG] Command not found after updating #24

pilgrimlyieu opened this issue Nov 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@pilgrimlyieu
Copy link

pilgrimlyieu commented Nov 3, 2023

Describe the bug

Recently, I updated coc extensions using :CocUpdate and I got an error below after executing :CocCommand markdown-preview-enhanced.openPreview.

[coc.nvim]: Error on notification "runCommand": Command: markdown-preview-enhanced.openPreview not found

I've tried some ways including but not limited to updating coc version, using the latest vim or uninstalling and reinstalling. But these all failed.

I've also reproduced the issue in another environment using :CocInstall coc-markdown-preview-enhanced, so I come here for help.

Regretfully, I've forgot the version that works normally.

In addition, I notice that the upstream(both vscode-markdown-preview-enhanced and crossnote[Renamed from mume]) restored to update frequently recently. I considered it may have something to do with this issue.

Hopefully this issue could be solved! I really appreciate this extension since I used to use markdown-preview-enhanced as my markdown renderer in VSCode.

Result from CocInfo

## versions

vim version: VIM - Vi IMproved 9.0 9002087
node version: v20.9.0
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /home/fesmoph/.vim/plugged/coc.nvim
term: dumb
platform: linux

## Log of coc.nvim

2023-11-03T16:29:55.407 INFO (pid:14435) [extension:coc-git] - Looking for git in: git
2023-11-03T16:29:55.553 WARN (pid:14435) [workspace] - Extension "coc-lists" registered synchronized autocmd "VimLeavePre", which could be slow.
2023-11-03T16:29:57.529 ERROR (pid:14435) [extensions-manager] - Error on active extension coc-markdown-preview-enhanced: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './out/src/utility' is not defined by "exports" in /home/fesmoph/.vim/extra/coc/extensions/node_modules/coc-markdown-preview-enhanced/node_modules/@shd101wyy/mume/package.json
    at new NodeError (node:internal/errors:406:5)
    at exportsNotFound (node:internal/modules/esm/resolve:268:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:598:9)
    at resolveExports (node:internal/modules/cjs/loader:547:36)
    at Module._findPath (node:internal/modules/cjs/loader:621:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at e (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:251:18271)
    at Object.<anonymous> (/home/fesmoph/.vim/extra/coc/extensions/node_modules/coc-markdown-preview-enhanced/lib/index.js:1750:22) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
2023-11-03T16:29:58.403 ERROR (pid:14435) [extensions-manager] - Error on activate coc-markdown-preview-enhanced Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './out/src/utility' is not defined by "exports" in /home/fesmoph/.vim/extra/coc/extensions/node_modules/coc-markdown-preview-enhanced/node_modules/@shd101wyy/mume/package.json
    at new NodeError (node:internal/errors:406:5)
    at exportsNotFound (node:internal/modules/esm/resolve:268:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:598:9)
    at resolveExports (node:internal/modules/cjs/loader:547:36)
    at Module._findPath (node:internal/modules/cjs/loader:621:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at e (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:251:18271)
    at Object.<anonymous> (/home/fesmoph/.vim/extra/coc/extensions/node_modules/coc-markdown-preview-enhanced/lib/index.js:1750:22) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
2023-11-03T16:29:58.408 INFO (pid:14435) [plugin] - coc.nvim initialized with node: v20.9.0 after 3325
2023-11-03T16:29:58.431 INFO (pid:14435) [language-client-index] - Language server "ltex" started with 14501
2023-11-03T16:29:58.613 INFO (pid:14435) [attach] - receive notification: runCommand [ 'markdown-preview-enhanced.openPreview' ]
2023-11-03T16:29:58.666 ERROR (pid:14435) [attach] - Error on notification runCommand Error: Command: markdown-preview-enhanced.openPreview not found
    at BR.executeCommand (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:66:4130)
    at BR.fireCommand (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:66:4296)
    at async Cy.runCommand (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:257:24008)
    at async Gy.cocAction (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:277:46159)
    at async EventEmitter.<anonymous> (/home/fesmoph/.vim/plugged/coc.nvim/build/index.js:277:47778)
2023-11-03T16:29:58.916 INFO (pid:14435) [attach] - receive notification: highlight []
2023-11-03T16:30:00.669 ERROR (pid:14435) [timing] - activate coc-markdown-preview-enhanced timeout after 5000ms
2023-11-03T16:30:05.903 INFO (pid:14435) [attach] - receive notification: showInfo []

Steps to reproduce
Steps to reproduce the behavior:

  1. execute vim
  2. :CocInstall coc-markdown-preview-enhanced or :CocUpdate
  3. CocCommand markdown-preview-enhanced.openPreview
  4. Error throwing

Expected behavior

Screenshots

Additional context
None

@pilgrimlyieu pilgrimlyieu added the bug Something isn't working label Nov 3, 2023
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

1 participant