Vim: Cannot find module 'lodash'

Created on 30 Nov 2017  路  3Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Environment:

  • VSCode Version:
    1.18.1
    929bacba01ef658b873545e26034d1a8067445e9
    2017-11-16T18:19:05.981Z
  • VsCodeVim Version: 0.10.5
  • OS: 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64

What happened:
The extension fails to load or function at all.

I followed the steps to debug the extension and found this in the Developers Console:
(https://code.visualstudio.com/docs/extensions/debugging-extensions)

[/Users/Tristian/.vscode/extensions/ms-vscode.cpptools-0.14.3]: Command `workbench.action.gotoSymbol` appears multiple times in the `commands` section.
extensionService.ts:441 [/Users/Tristian/.vscode/extensions/ms-vscode.cpptools-0.14.3]: Command `workbench.action.showAllSymbols` appears multiple times in the `commands` section.
mime.ts:59 Overwriting extension <<.lhs>> to now point to mime <<text/x-literate haskell>>
(anonymous) @ mime.ts:59
console.ts:123 [Extension Host]% Object
console.ts:123 [Extension Host] Activating extension `vscodevim.vim` failed: Cannot find module 'lodash'.
t.log @ console.ts:123
console.ts:123 [Extension Host] Activating extension `vscodevim.vim` failed:  Cannot find module 'lodash'
t.log @ console.ts:123
console.ts:123 [Extension Host] Here is the error stack:  Error: Cannot find module 'lodash'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Function.o._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:4:484450)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/Tristian/.vscode/extensions/vscodevim.vim-0.10.5/out/extension.js:17:11)
    at Object.<anonymous> (/Users/Tristian/.vscode/extensions/vscodevim.vim-0.10.5/out/extension.js:362:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
extensionService.ts:437 Activating extension `vscodevim.vim` failed: Cannot find module 'lodash'.
e._logMessageInConsole @ extensionService.ts:437
shell.ts:459 Cannot read property 'offset' of undefined: TypeError: Cannot read property 'offset' of undefined
    at e.applyEditsToBuffer (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:10:305424)
    at e.writeToBuffer (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:10:305244)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:10:305078
    at Object.g [as _notify] (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:62701)
    at Object.enter (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:66048)
    at n.Class.derive._creator._run (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:67876)
    at n.Class.derive._creator._completed (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:67317)
    at n.Class.derive._creator.then (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:69309)
    at Object.enter (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:65127)
    at n.Class.derive._creator._run (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:67876)
    at n.Class.derive._creator._setCompleteValue (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:67570)
e.onUnexpectedError @ shell.ts:459
console.ts:123 [Extension Host] (node:2055) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:377
(anonymous) @ extensionHost.ts:202
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104

What did you expect to happen:

Have vim key bindings in VSCode.

How to reproduce it:

Just open VSCode with the extension enabled, I have the following vscode usersettings:

...
"vim.enableNeovim": true,
"vim.neovimPath": "/usr/local/bin/nvim",
 "vim.disableAnnoyingNeovimMessage": true,
...

Most helpful comment

Can you try deleting /Users/Tristian/.vscode/extensions/vscodevim.vim-0.10.5 folder and then reinstalling the extension? I see lodash in the package.json https://github.com/VSCodeVim/Vim/blob/master/package.json#L573 so not sure why it would be complaining.

Also, "vim.disableAnnoyingNeovimMessage": true, isn't necessary anymore as I deleted the neovim message :)

All 3 comments

Can you try deleting /Users/Tristian/.vscode/extensions/vscodevim.vim-0.10.5 folder and then reinstalling the extension? I see lodash in the package.json https://github.com/VSCodeVim/Vim/blob/master/package.json#L573 so not sure why it would be complaining.

Also, "vim.disableAnnoyingNeovimMessage": true, isn't necessary anymore as I deleted the neovim message :)

Thanks @jpoon that did the trick:

  1. Quit VSCode.
  2. In a terminal:
    terminal rm -rf $HOME/.vscode/extensions/vscodevim.vim-0.10.5
  3. Reopen VSCode.
  4. Reinstall extension and reload editor.

cool

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndersenJ picture AndersenJ  路  3Comments

edwintorok picture edwintorok  路  3Comments

stefanoio picture stefanoio  路  3Comments

jaredly picture jaredly  路  3Comments

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments