I am not super literate in whats going on with your exercise, but I think I have noticed a few things about it in relation to mine as well. Here goes
First thing I noticed is that this is happening to you on crypto-square
. Does this happen for you on everything else also? Ideally could you check it out on a freshly cloned hello-world
exercise also in order to minimize the amount of possible things that are going wrong here?
Another thing I noticed is that your first error seems to include a node_modules
folder in the filepath listed in the error. In my case, the reason this is causing problems is because of the switch to Yarn 3. This article by Yarn about Plug’n’Play explains the main benefit of the upgrade (this is also referenced in Installing Typescript Locally at the beginning of the Typescript track) is to no longer have so much being installed when installing the dependencies.
Meaning; it is my belief that if we have a node_modules
present whatsoever it is going against the core benefit of even using Yarn PNP
. If I use npm to install my dependencies it eliminates all the problems i’m having. (at the cost of adding a huge node_modules
folder :( )
Your configuration with the lint plugin as a dependency seems to be similar, some referencing at some point is unhappy with the way it’s configured.
Got a couple of suggestions to try, granted none of them may work and some may make the waters even more muddy, to use your words lol, so try at your own risk (however you can always reclone a fresh exercise, and if you exercism submit
an iteration it should keep the progess you made before messing around with my suggestions.
I will list both the npm
and yarn
commands for you to try, but please try using the yarn
command first; as ideally it seems like npm should be avoided for dependency management at this point. But try both if yarn
doesn’t work.
-
yarn add eslint-plugin-import --dev
to add eslint-plugin-import
as a dependency via yarn
because the error seems to describe that it can’t find this at all.
(npm => npm install eslint-plugin-import --save-dev
)
-
there should be an eslint configuration file somewhere in the project, it should be called either .eslintrc.js
, .eslintrc.json
, .eslintrc.yml
or something like that. This file should be configured to reference the correct plugin, which seems to be eslint-plugin-import
in this case. It should be under a section called plugins
-
Clear the ESLint cache. yarn eslint --clear-cache
(npm => npm run eslint -- --clear-cache
)
Those are the only suggestions I can help with, but I’d recommend trying to see if this problem happens for you on other exercises (especially the hello world opener exercise), and if it DOESN’T happen on another exercise, possibly a fresh clone of the one you’re having trouble with might solve it, in addition to what I’ve described.
Overall, it seems to me like we may be having a similar problem with yarn
related dependencies. Let me know if you find out more!