question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Local tern installation instead of global one

See original GitHub issue

I switch node/npm versions in different projects and having to install globally means that I have to install it on every version that I use, which is kind of a pain. So if we can make this a local dependency for the plugin like tern_for_vim this would be great.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
FuzzOli87commented, Apr 21, 2016

@carlitux While gulp-cli, ava-cli, babe-cli etc… should be installed globally. Like @ahmedelgabri I install all of that as a devDependency and either run them through npm scripts and I also have export PATH=$PATH:./node_modules/.bin in my .zshrc file. This keeps my global installs relatively clean.

I do this because I work on multiple projects that tend to have different tools. One might use Grunt, the other Gulp or the worst case recently was the different versions of Babel.

I do have tern_for_vim installed as well. I thought it was compatible, but it doesn’t look like it.

1reaction
jacobraskcommented, Apr 20, 2016

Using $(npm bin)/tern as the tern binary is the best choice in my opinion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm 1.0: Global vs Local installation - Node.js
Whether to install a package globally or locally depends on the global config, which is aliased to the -g command line switch. Just...
Read more >
Tern Reference Manual
Returns an object with a name property holding the name of the variable or property, a refs property holding an array of {file,...
Read more >
How to tell if an npm package was installed globally or locally
Use the list command with the -g flag to see all packages that are installed globally: npm list -g. To check if a...
Read more >
yarn global add doesn't install binaries properly #648 - GitHub
I can't write to /usr/local/bin due to missing sudo permissions: $ yarn global add create-react-app yarn global v1.21.1 [1/4] Resolving packages ...
Read more >
Run Locally Installed NPM Packages Without Global Install
But it's recommended to install packages locally instead of globally 1. Updating a global package would make all your projects use the new ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found