juanfranblanco / vscode-solidity

Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
MIT License
871 stars 187 forks source link

Error: Source file requires different compiler version (current compiler is 0.8.19+commit.7dd6d404.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version #421

Closed BeamNawapat closed 10 months ago

BeamNawapat commented 10 months ago

in my solidity file, it's version "^0.8.21" and my config is localNodeModule and I am using hardhat

so when I selected localNodeModule I already downloaded the compiler version in the root of that folder

Error logs

[{
    "resource": "/Users/beamnawapat/Desktop/GithubRepo/Covest/certificate/contracts/certificate.sol",
    "owner": "_generated_diagnostic_collection_name_#0",
    "code": "5333",
    "severity": 8,
    "message": "Source file requires different compiler version (current compiler is 0.8.19+commit.7dd6d404.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version",
    "startLineNumber": 2,
    "startColumn": 1,
    "endLineNumber": 2,
    "endColumn": 25
}]
BeamNawapat commented 10 months ago

I fixed it by install solc modules by "npm install solc"