question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Both "extract to function" and "extract to file" failed

See original GitHub issue

I can’t get any of the aforementioned functions to work, here’s my CocInfo log:

## versions

vim version: NVIM v0.5.0-710-gb9ceac465
node version: v14.12.0
coc.nvim version: 0.0.79-be822b546f
coc.nvim directory: /home/user/.config/nvim/plug.vim/coc.nvim
term: xterm-kitty
platform: linux

## Log of coc.nvim

2020-11-09T09:33:33.113 ERROR (pid:962707) [extension:coc-react-refactor] - Extract JSX to function: TypeError: coc_nvim_1.workspace.requestInput is not a function
    at Object.exports.askForName (/home/user/.config/coc/extensions/node_modules/coc-react-refactor/lib/index.js:75232:45)
    at exports.extractToFunction (/home/user/.config/coc/extensions/node_modules/coc-react-refactor/lib/index.js:69634:36)
    at CommandItem.execute (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24057:21)
    at CommandManager.executeCommand (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24395:44)
    at CommandManager.execute (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24335:29)
    at Handler.applyCodeAction (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:89637:36)
    at Handler.doCodeAction (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:89599:24)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Plugin.cocAction (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24009:16)
    at async NeovimClient.<anonymous> (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:11597:21)
2020-11-09T09:33:43.847 INFO (pid:962707) [completion-complete] - Results from: around,snippets
2020-11-09T09:33:49.677 ERROR (pid:962707) [extension:coc-react-refactor] - Extract to file: TypeError: coc_nvim_1.workspace.requestInput is not a function
    at Object.exports.askForName (/home/user/.config/coc/extensions/node_modules/coc-react-refactor/lib/index.js:75232:45)
    at exports.extractToFile (/home/user/.config/coc/extensions/node_modules/coc-react-refactor/lib/index.js:69674:36)
    at CommandItem.execute (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24057:21)
    at CommandManager.executeCommand (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24395:44)
    at CommandManager.execute (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24335:29)
    at Handler.applyCodeAction (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:89637:36)
    at Handler.doCodeAction (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:89599:24)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Plugin.cocAction (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:24009:16)
    at async NeovimClient.<anonymous> (/home/user/.config/nvim/plug.vim/coc.nvim/build/index.js:11597:21)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fannheywardcommented, Nov 10, 2020

Fixed on latest coc.nvim, please upgrade it.

1reaction
fannheywardcommented, Nov 9, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Extract Function refactoring command fails
In my C++ project, I'm trying to extract a piece of code into a function, by using the Extract Function refactor command. I...
Read more >
zipfile - extract method executes without error but file is not ...
I have a very simple zipfile implementation in python which succeeds at extracting from certain zip files but fails consistently on other ...
Read more >
Error with function argument when using extract function in R
I am using the script described here to try to extract a count of raster cells within polygons in a shapefile.
Read more >
PH24370: MISMATCH BETWEEN OPTIM DIRECTORY ... - IBM
Error description: Customer is performing EXTRACT+CONVERT processing in BATCH. ... OPTIM DIRECTORY AND EXTRACT FILE Number of Function Entries= 8 ErrCB.
Read more >
Extract method | IntelliJ IDEA Documentation - JetBrains
In case there are multiple output variables, the Extract Method refactoring may not be applied, and the error message appears. There are several ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found