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

Cannot find module #43

Open
caliangxie opened this issue Jul 7, 2017 · 5 comments
Open

Cannot find module #43

caliangxie opened this issue Jul 7, 2017 · 5 comments

Comments

@caliangxie
Copy link

When I try to run it, I get an error popup saying that the module 'C:\Users\Me' cannot be found. I have eslint installed and I can run it just fine on the command line.

@AoDev
Copy link
Contributor

AoDev commented Jul 12, 2017

You should check the plugin config and see if all the paths in there are correct. You should enable debug: true in the config and check the console for error messages.

@caliangxie
Copy link
Author

Sorry for the very late reaction.

I tried to see whether I could figure out the issue again and this time(how did I not notice this last time) I noticed that my username folder was cut in half.

The thrown error says that module 'C:\Users\A' cannot be found but my name is 'A B' so perhaps the space is causing the issue?

@skeggse
Copy link
Collaborator

skeggse commented May 19, 2020

The thrown error says that module 'C:\Users\A' cannot be found but my name is 'A B' so perhaps the space is causing the issue?

This seems likely. It'd be worth checking if running subprocess.Popen('C:\Users\A B\...\path\to\eslint') works as expected.

@sricks
Copy link

sricks commented Mar 19, 2021

I was getting module_not_found issues, in my case I think it's because I'm mounting a remote filesystem via SFTP using GVFS on Linux. I think there's some issue with following symlinks, but never confirmed that.

I fixed it by copying the eslint file into my home directory and ensuring I only ever use local eslint stuff in Sublime:

{
	"local_eslint_path": {
		"linux": ""
	},
	"eslint_path": {
		"linux": "/home/username/node_modules/.bin/eslint",
		"config_path": "/home/username/.eslintrc.custom.json"
	},
	"extra_args": ["--no-eslintrc"]
}

That got rid of the error, but I noticed it's not actually fixing any kind of formatting now... but hopefully this helps someone get further.

@sricks
Copy link

sricks commented Mar 19, 2021

Silly me, this is at least partly because config_path is not part of eslint_path, it's a top-level option. This allows it to format:

{
	"local_eslint_path": {
		"linux": ""
	},
	"eslint_path": {
		"linux": "/home/username/node_modules/.bin/eslint"
	},
	"config_path": "/home/username/.eslintrc.custom.json",
	"extra_args": ["--no-eslintrc"]
}

It's not formatting everything I would expect, but I haven't touched that eslint file in a while, and it did change at least one thing. So I think it's working this way.

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

No branches or pull requests

4 participants