Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Error: Unable to execute npm get prefix. Please make sure Atom is getting $PATH correctly #408

Closed
lmartins opened this issue Jan 25, 2016 · 20 comments

Comments

@lmartins
Copy link

Hi,

After today's update I've started getting this message every time I open a JS file:

Error: Unable to execute `npm get prefix`. Please make sure Atom is getting $PATH correctly
    at getNodePrefixPath (/Users/luismartins/.atom/packages/linter-eslint/lib/worker-helpers.js:43:13)
    at getESLintFromDirectory (/Users/luismartins/.atom/packages/linter-eslint/lib/worker-helpers.js:53:49)
    at Object.getESLintInstance (/Users/luismartins/.atom/packages/linter-eslint/lib/worker-helpers.js:83:10)
    at /Users/luismartins/.atom/packages/linter-eslint/lib/worker.js:56:26
    at /Users/luismartins/.atom/packages/linter-eslint/node_modules/process-communication/node_modules/sb-event-kit/lib/emitter.js:63:9
    at Array.forEach (native)
    at Emitter.emit (/Users/luismartins/.atom/packages/linter-eslint/node_modules/process-communication/node_modules/sb-event-kit/lib/emitter.js:59:30)
    at /Users/luismartins/.atom/packages/linter-eslint/node_modules/process-communication/node_modules/sb-communication/lib/main.js:22:23
    at /Users/luismartins/.atom/packages/linter-eslint/node_modules/process-communication/node_modules/sb-communication/lib/main.js:21:24
    at /Users/luismartins/.atom/packages/linter-eslint/node_modules/process-communication/node_modules/sb-event-kit/lib/emitter.js:61:9
@steelbrain
Copy link
Contributor

Open a terminal and do

npm get prefix

paste the value into settings

@steelbrain
Copy link
Contributor

If you are not using global node and eslint, then uncheck the Use Global ESLint option

@lmartins
Copy link
Author

Thank you @steelbrain, the npm get prefix did the trick.

@OKNoah
Copy link

OKNoah commented Jan 27, 2016

This error popped up for me today too.

@Arcanemagus
Copy link
Member

Did the comments earlier in the issue resolve it for you @OKNoah, or are you still running into problems?

@thearabbit
Copy link

I have the same problem (I use windows 7).

2016-02-16_21-00-25

@steelbrain
Copy link
Contributor

@thearabbit You have selected Use global ESLint installation even though you didn't install it globally (presumably), either install it globally or uncheck the config

@thearabbit
Copy link

So I need install vai npm or apm.

@steelbrain
Copy link
Contributor

By checking global eslint, you declare that you have eslint and therefore node installed globally, to get the prefix path of your node installation you should do npm get prefix

@thearabbit
Copy link

Thanks, Now it don't after I installed node, But show error with module:

2016-02-16_22-08-38

@thearabbit
Copy link

Sorry it have problem with eslint or any....

@steelbrain
Copy link
Contributor

That is not actually an error but a user misconfiguration, please configure eslint to allow es6+ syntax

@thearabbit
Copy link

Could you help me, how to solve?

@steelbrain
Copy link
Contributor

I personally use babel-eslint as my parser, check it out here https://github.com/babel/babel-eslint#setup

@thearabbit
Copy link

Now I tried to install babel-eslint, but still problem.

@thearabbit
Copy link

npm install -g eslint

apm install language-babel

@steelbrain
Copy link
Contributor

@thearabbit This is a bug report for a completely different thing, I would love to help you but you're asking for help about something very basic of eslint (not related to this Atom package), I would recommend you google some Getting started with ESLint or ask for help in IRC

@thearabbit
Copy link

Very thanks for your helping, I will try the best.

@annacollins85
Copy link

@steelbrain if you are using global node, but local eslint how should you configure things?

@steelbrain
Copy link
Contributor

@annacollins85 You shouldn't have to configure anything, it should run out of the box in that scenario :)

Also this is a pretty old issue, if you're still having this problem, please open a new issue instead

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants