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

JS dependencies will not install correctly #471

Open
blazeu opened this issue Oct 25, 2017 · 4 comments
Open

JS dependencies will not install correctly #471

blazeu opened this issue Oct 25, 2017 · 4 comments

Comments

@blazeu
Copy link
Member

blazeu commented Oct 25, 2017

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)
@blazeu
Copy link
Member Author

blazeu commented Oct 25, 2017

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

@yashovardhan
Copy link
Member

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?

@blazeu
Copy link
Member Author

blazeu commented Nov 21, 2017

at the starting of package.json

You can't run that inside a .json file.

I don't think you understand this.

@yashovardhan
Copy link
Member

we have to provide environment variables NODE_PATH and PATH these values so we have to make a process.env file?

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

No branches or pull requests

3 participants