Yarn add solc not adding package.json, node_modules, or yarn.lock files to directory #423
-
Hello! I have been caught up on the section of the tutorial where I am supposed to add package.json, node_modules, and yarn.lock to my folder by running the command: I am getting this error: I'm trying to figure out what is going on, and why this is happening. It looks like my node version is incompatible, but given it expects ^12, and I am on 18, I don't think that should be the issue? It also says I should remove package-lock.json, however I do not see that in my folder (and have tried removing it but get error that no file exists). I saw a similar post where the person was able to solve issue by deleting node_modules in other directories. I tried that as well, but no luck. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Maybe you don't have yarn installed in your wsl or whatever terminal you are using. Check
If it gives you a version number then let us know here. if it gives back nothing or err then install yarn first using npm..... And check this StackOverflow post as well |
Beta Was this translation helpful? Give feedback.
-
You have node version |
Beta Was this translation helpful? Give feedback.
You have node version
18.3.0
Which is currently not compatible with hardhat, installLTS
version of node. And delete anypackage-lock.json
file in your folder.