Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Pragma Syntax #22

Open
RyanJoseph15 opened this issue Feb 17, 2019 · 0 comments
Open

Pragma Syntax #22

RyanJoseph15 opened this issue Feb 17, 2019 · 0 comments

Comments

@RyanJoseph15
Copy link

I was following the README on getting setup and ran into the following truffle compile errors:

ryan$ truffle compile
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/SimpleStorage.sol...

/Users/ryan/Development/react-uport/contracts/Migrations.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
,/Users/ryan/Development/react-uport/contracts/SimpleStorage.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.17;
^----------------------^
Compilation failed. See above.
Truffle v5.0.4 (core: 5.0.4)
Node v9.11.1

I found this stackoverflow article that pointed me in the direction of how to get around this with my version of Truffle and Node.
tl;dr: pragma solidity ^0.4.24pragma solidity >=0.4.24 in those two files.

This obviously depends on the versions people are running. But, it may be worth making the change or documenting that if people run into similar issues, how to immediately resolve it without having to duplicate research.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant