documentation
documentation copied to clipboard
JS dependencies will not install correctly
http://docs.coala.io/en/latest/Users/Install.html#js-dependencies states that you run npm install -g
to install JS dependencies, however that only installs the coala-bears globally (which is useless) not each of the dependencies stated in package.json (e.g. eslint) globally.
When running npm install -g
what's actually happening is:
- npm installs all dependencies stated in
package.json
locally (node_modules folder inside the project) - npm creates a symlink to coala-bears folder inside their 'global dependencies folder' (try
npm root -g
to find where it actually is)
The solution might be to add node_modules
inside the project to PATH and also set NODE_PATH like in https://github.com/coala/docker-coala-base/blob/master/Dockerfile#L10-L11
OR
Just install the dependencies interactively when running coala
e.g. when coala is missing something, ask the user to install it, obviously requires fixing in coala/coala-
bears
I think I can work on this.. @blazeu I have to write something like
export NODE_PATH='yourdir'/node_modules
at the starting of package.json
but the PATH
will be different for different machines... isn't it?
at the starting of package.json
You can't run that inside a .json file.
I don't think you understand this.
we have to provide environment variables NODE_PATH and PATH these values so we have to make a process.env file?