maksimr / vim-jsbeautify

vim plugin which formated javascript files by js-beautify
757 stars 68 forks source link

file path for require seems to be incorrect #126

Closed pbdeuchler closed 8 years ago

pbdeuchler commented 8 years ago

(installed yesterday)

module.js:327
    throw err;
    ^

Error: Cannot find module '/Users/pdeuchler/workspace/dotfiles/janus/vim-jsbeautify/plugin/lib/js/lib/beautify.js'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at e (/Users/pdeuchler/Dropbox/workspace/dotfiles/janus/vim-jsbeautify/plugin/beautify.min.js:1:884)
    at /Users/pdeuchler/Dropbox/workspace/dotfiles/janus/vim-jsbeautify/plugin/beautify.min.js:1:1117
    at Object.<anonymous> (/Users/pdeuchler/Dropbox/workspace/dotfiles/janus/vim-jsbeautify/plugin/beautify.min.js:1:1334)
    at Object.<anonymous> (/Users/pdeuchler/Dropbox/workspace/dotfiles/janus/vim-jsbeautify/plugin/beautify.min.js:1:1344)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

And here is the plugin directory tree:

14:36:08: /Users/pdeuchler/.janus/vim-jsbeautify/plugin (master) (3) 
 → tree . -L 5
.
├── beautifier.vim
├── beautify.js
├── beautify.min.js
└── lib

1 directory, 3 files

FYI I have /Users/pdeuchler/workspace/dotfiles/janus/ symlinked to /Users/pdeuchler/.janus/

maksimr commented 8 years ago

@pbdeuchler It's really strange. I have installed latest version of vim-jsbeautify and all work as expected with default config

14:36:08: /Users/pdeuchler/.janus/vim-jsbeautify/plugin (master) (3) → tree . -L 5

Three should be more files than 1 directory and 3 files. Look like you does not init git submodule inside plugin

You also could download js-beautify separately and define in .editorconfig path to it

Thanks

pbdeuchler commented 8 years ago

@maksimr yup, seems my submodule update is failing because I have weirdness in my config. Appreciate the help!

maksimr commented 8 years ago

@pbdeuchler you are welcome!)