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

"E121: Undefined variable: b:node_root" error #37

Open
mMontu opened this issue Nov 1, 2016 · 7 comments
Open

"E121: Undefined variable: b:node_root" error #37

mMontu opened this issue Nov 1, 2016 · 7 comments

Comments

@mMontu
Copy link

mMontu commented Nov 1, 2016

First of all, thanks for sharing this nice plugin!

When issuing Ctrl+p/n or [+I on some files (which ends with .js) I get the following error:

    E121: Undefined variable: b:node_root
    Error detected while processing function node#lib#find[8]..<SNR>233_absolutize:
    line    7:
    E15: Invalid expression: b:node_root . "/node_modules/" . a:name  

The variable b:node_root is indeed undefined on the files which display errors. On the files where the problem doesn't ocurr the variable is defined.

mMontu added a commit to mMontu/vim-node that referenced this issue Nov 1, 2016
mMontu added a commit to mMontu/vim-node that referenced this issue Nov 1, 2016
@moll
Copy link
Owner

moll commented Apr 4, 2017

Thanks for taking the time to let me know and sorry for the belated response. I should really look into this! :)

@mMontu
Copy link
Author

mMontu commented Apr 24, 2017

Glad you liked. The code simplification in the PR solved the problem for me, but I may have missed some corner case.

@johnelliott
Copy link

I think I'm having this error too. It's been bugging me for a while and I just today typed the right thing in to google to lead me here.

@mMontu
Copy link
Author

mMontu commented May 29, 2017

@johnelliott I've created a pull request with a possible fix. If you'd like to test it, you can clone my E121 branch: https://github.com/mMontu/vim-node/tree/E121

@johnelliott
Copy link

johnelliott commented May 29, 2017

Thanks @mMontu, I read the diff a few days ago. I'll give it a shot. Currently I'm seeing if I was even using the plugin at all. For background, I've been removing plugins in general, nothing against this one 😇

@benswinburne
Copy link

Hi, is there any news on this? This problem appears for me when trying to tab complete. I can post more information if needs be.

@robincafolla
Copy link

robincafolla commented Aug 3, 2018

This happens for me whenever I tab autocomplete a file with a shebang of #!/usr/bin/node which doesn't live in a dir with a node_modules sub folder.

The fix is to create a node_modules folder, but a patch would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants