-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Failed to resolve module: xo. Ensure that xo is installed. #100
Comments
You can disable the extension per workspace in vscode. Perhaps this is too aggressive. I'll leave this open and see if others find it too annoying. I will just have it report this particular error in the in the extension tab only. |
Yesterday I reopened my project and started to get the failed to resolve module xo error. My workspace root is not a npm package and only one subfolder is using xo, with xo configuration in the package.json file. The plugin has worked fine up until now... Did downgrade to version 3.2.0 and it works again. |
I went ahead and published an update (3.3.2) so that particular error message should only be shown once and then it will continue to try to resolve xo in the background, without showing an error, until you install it. I may consider removing this message altogether in the future but I feel it could be helpful to new users. Hopefully this is a good middle ground.
Not sure what your workflow is here, but 3.2 does not have proper support for "multi-root/multi-folder" workspaces. 3.3+ now can resolve different versions of xo for each folder and apply them properly. It sounds like you were possibly using the a work around that no longer applies now that full support is in 3.3. @tbrolin - if you think this is a separate problem - maybe let me know some more specifics about your set up so I can repro and fix. |
I also find this message annoying and aggressive. So, I'd like to offer an approach I came up with: to check the current folder tree's package.json, and
|
I agree with @darkred, and their solution sounds good to me provided xo config files are also checked for. This error assumes that xo is used in all javascript projects. |
@darkred @sachinraja - do you feel it is still aggressive even as it is now - showing only 1 time per open instance of VScode? @darkred I like that idea - I will implement it that way. - however, I won't make it depend on xo being in package.json, it will attempt to resolve xo and lint no matter what, but if xo isn't present in package deps - it will fail silently. Otherwise it will show the error once per folder. Thanks for the suggestion. @sachinraja xo does not need any config files to work. It requires 0 config so searching for a config like the eslint extension does is pointless. |
I do feel that is still aggressive as the error shows every time I open vscode to a project without xo. |
Yes, because e.g. my repo doesn't use XO, and so, I shouldn't get the message at all - it's irrelevant and therefore distracting: |
The extension will only show the resolution error now if xo is listed in package.json :) thanks yall! |
Thank you for listening to our feedback @spence-s! Really appreciate your work on this extension |
Some of my repositories don't use
xo
and every second that I type some javascript code, a popup appears saying:Failed to resolve module: xo. Ensure that xo is installed.
Maybe, the extension will not show the popup if it is not installed because not all repositories use
xo
.Thanks for making this vscode extension!
The text was updated successfully, but these errors were encountered: