-
Notifications
You must be signed in to change notification settings - Fork 2
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
Broken Pipe #14
Comments
What version of import-js do you have installed? You can find this out by running |
The version is |
Could you run On Wednesday, 31 August 2016, LeonardoGentile [email protected]
|
I'm getting the exact same error. Using Sublime 3103 and import-js 1.1.0. The log file you mentioned checking (found at the path returned by
|
Cool, thanks for providing more context @bcaplan! Could you try running |
What version of the sublime plugin are you using? (e.g. 1.0.0 or 1.0.1) |
Yeah, that's expected behavior. Could you post the output from the Sublime console where it says "ImportJS loaded with environment:"? I wonder if this is a PATH issue. You can obfuscate any paths or settings you don't want to share publicly. It's possible that the PATH doesn't contain the folder where |
As @bcaplan sais also my log file is empty. I have another clue: the plugin sometimes works. Meaning that from time to time it works on some jsx file, then even in the same file it starts not to work logging the error described in the first post and then after that it won't work anymore for any file. How sometimes it works/doesn't work seems not to be predictable, let me know if I can I do something more to track down this problem. |
@trotzig It doesn't appear to be a PATH issue since I am able to resolve it in the Sublime console:
I have a bit more info I discovered on the behavior. This might be what @LeonardoGentile was seeing as well with his intermittent success. If I relaunch Sublime, I am able to get it to work with the
|
Everyone, thanks for helping out. I managed to reproduce the issue locally by trying to import inside an anonymous file (one that hasn't yet got a filename). I just submitted version 1.1.1 of the npm module, so all you need to do to is
We should have caught this earlier. But neither me, @lencioni, or any other of the core members of import-js use the Sublime plugin on a daily basis. Without you folks reporting stuff like this, it would have never been caught. Thanks for making import-js better! 😍 |
I'm going to close this with the assumption that 1.1.1 fixes the issue. If you still get the error, please reopen! |
@trotzig I'm still seeing the issue running 1.1.1 😖 . The file I've been testing with is saved to disk. |
@trotzig Thanks for all your help on this, it's a really great utility! I just noticed (and corrected) a typo above in which I stated I was getting an error with the |
That's too bad... 😢 Did you restart Sublime after upgrading? |
(not that I really think that's going to help) |
@trotzig This might actually be caused by an odd conflict with ESLint. I tried running the Commenting out the offending line in my For posterity, I had the
|
That's interesting. It uses eslint under the hood to find all undefined variables (and unused imports too). We should handle this better though, so I filed an issue over at the main project to track: Galooshi/import-js#348 |
Ah, that makes sense. Thanks again for the help! |
When you eslint your project, do you rely on a globally installed eslint + plugins or do you use local ones in the |
I'm closing this once more. Thanks for your patience. |
We have it installed locally with that plugin in |
@bcaplan if you have eslint-config-airbnb-base installed, I believe you need to extend {
"extends": [
"airbnb-base"
]
} |
@lencioni It seems to work either way. Here's the error it has in case anyone is curious:
|
According to eslint/eslint#6655 this can happen if running something that uses ESLint 2.x (which is the version bundled with import-js). I hopped into my local import-js module folder and upgraded ESLint to 3.x. It fixed the issue with the airbnb plugin. I guess the problem is that it's able to us an |
Unlike @bcaplan I don't have a locally installed eslint, mine is global and its version is v3.1.1 So maybe this version mismatch could be the cause |
This version mismatch is unfortunate, and the dependency between the locally installed eslint and the eslint used by import-js needs to be cut or improved in some way. We use the local eslint configuration for two reasons:
We could introduce a Let's continue the discussion over at the main project since this isn't really sublime-specific: Galooshi/import-js#348 |
|
I am facing the same error while using
Version info is as follows:
|
This issue was filed when we were still relying on eslint @pranjaltech. My guess would be that |
@trotzig Yep, I can run importjs outside sublime.
I noticed that running importjs is not giving any useful output. Eg. -
The output is:
|
@trotzig It's working now! Thanks for pointing me in the right direction –
I had recently downgraded from To fix the issue, I just ran:
and it works! |
Awesome @pranjaltech, I'm glad you got it working! |
Hi,
I'm on Mac Os, using node 6.3.1, Sublime Text 3114.
I've followed the installation instruction and already tried the suggested troubleshooting, but I had not luck. I've manually set the path to: "/Users/foo/.nvm/versions/node/v6.3.1/bin/node"
I've tested this on a jsx file, I place the cursor under an components that I need to import, then either by hitting a shortcut or using the command palette I launch "Import word under cursor" and I get this error message:
The text was updated successfully, but these errors were encountered: