-
Notifications
You must be signed in to change notification settings - Fork 68
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
Error: Cannot find module '/home/current/working/directory/' #67
Comments
@jbolila try copy |
thanks @maksimr, but doesn't solve this issue:
{
'jsx': {},
'js': {'indent_char': ' ', 'path': '~/tmp/js-beautify/js/lib/beautify.js', 'space-in-paren': 'true', 'indent_style': 'space', 'indent_size': '2', 'bin': 'node'},
'json': {},
'html': {'indent_char': ' ', 'path': '~/tmp/js-beautify/js/lib/beautify-html.js', 'indent_style': 'space', 'indent_size': '2'},
'css': {'indent_char': ' ', 'path': '~/tmp/js-beautify/js/lib/beautify-css.js', 'indent_style': 'space', 'indent_size': '2'}
} and the error:
this is not a new system, i'm using this setup for many months now and always updating to the latest versions with Vundle. Something has changed on this plugin or in node. one question, why the path isn't been effective? (i have tried to copy the file |
@jbolila Thanks for the info!
The Can you roll back plugin(vim plugin) on some version behind? |
Thanks, can you explain me just one more thing. What is supposed to load on this lines: if (has("host-node")) {
(function() {
var fs = require("fs");
load = function(path) {
var context = {},
property;
if (path.charAt(0) !== "/" && path.charAt(1) !== ":") {
path = global.process.cwd() + "/" + path
}
context = require(path);
.. the path starts empty on this block (in this case), and ends with the value of Vim version 7.4.473 on Linux |
JavaScript file which will beautify content for example |
quick and dirty fix: context = require('/home/jbolila/.vim/bundle/js-beautify/js/lib/beautify.js'); don't know why the path starts empty in the load method. |
@jbolila try debug vim function and this. Maybe |
really thanks @maksimr, and here are the results of the debug: let opts = b:config_Beautifier[type]
let path = get(opts, 'path', s:getPathByType(type))
echom "PATH.0 IS '" . path . "' for type ". type
let path = expand(path)
echom "PATH.1 IS '" . path . "' for type ". type and results in:
the file exists, and the expand function is doing something wrong. I'm using Vim version 7.4.473 on Arch Linux, maybe something with this version of Vim. |
@jbolila yup. For me Maybe you have some plugin which redefine
|
vim-jsbeautify/plugin/beautify.min.js
is failing on therequire(path)
, any clue?(js-beautify is working well on Node, and is in the latest version)
doesn't matter what is defined on the
.editorconfig
is always using the same path inside the bundle
at load (/home/myhome/.vim/bundle/vim-jsbeautify/plugin/beautify.min.js:1:1175)
[node: v0.10.32, npm: 2.1.4]
The text was updated successfully, but these errors were encountered: