Unable to run truffle compile












1














I want to run truffle compile on my AWS Ubuntu 18.4 server. I'm able to compile the same contracts on my local with no compilation errors but when I tried to run truffle compile on AWS ubuntu server it throws Syntax Errors.



Can someone please explain what's happening here? Do you think truffle version can be an issue here?



Local System: Truffle v4.1.14 (core: 4.1.14)



AWS Ubuntu Server: Truffle v5.0.1 (core: 5.0.1)










share|improve this question


















  • 1




    You're gonna have to share some more information here. What are the syntax errors? How do you install Truffle on your local machine? How do you install Truffle on the remote machine?
    – goodvibration
    yesterday






  • 2




    BTW, Truffle 4.1.14 relies on solc 0.4.24, while Truffle 5.0.1 relies on solc 0.5.0. Between these two versions of solc there are breaking changes, meaning, you're very much likely to get compilation errors in the latter, but not in the former.
    – goodvibration
    yesterday


















1














I want to run truffle compile on my AWS Ubuntu 18.4 server. I'm able to compile the same contracts on my local with no compilation errors but when I tried to run truffle compile on AWS ubuntu server it throws Syntax Errors.



Can someone please explain what's happening here? Do you think truffle version can be an issue here?



Local System: Truffle v4.1.14 (core: 4.1.14)



AWS Ubuntu Server: Truffle v5.0.1 (core: 5.0.1)










share|improve this question


















  • 1




    You're gonna have to share some more information here. What are the syntax errors? How do you install Truffle on your local machine? How do you install Truffle on the remote machine?
    – goodvibration
    yesterday






  • 2




    BTW, Truffle 4.1.14 relies on solc 0.4.24, while Truffle 5.0.1 relies on solc 0.5.0. Between these two versions of solc there are breaking changes, meaning, you're very much likely to get compilation errors in the latter, but not in the former.
    – goodvibration
    yesterday
















1












1








1


0





I want to run truffle compile on my AWS Ubuntu 18.4 server. I'm able to compile the same contracts on my local with no compilation errors but when I tried to run truffle compile on AWS ubuntu server it throws Syntax Errors.



Can someone please explain what's happening here? Do you think truffle version can be an issue here?



Local System: Truffle v4.1.14 (core: 4.1.14)



AWS Ubuntu Server: Truffle v5.0.1 (core: 5.0.1)










share|improve this question













I want to run truffle compile on my AWS Ubuntu 18.4 server. I'm able to compile the same contracts on my local with no compilation errors but when I tried to run truffle compile on AWS ubuntu server it throws Syntax Errors.



Can someone please explain what's happening here? Do you think truffle version can be an issue here?



Local System: Truffle v4.1.14 (core: 4.1.14)



AWS Ubuntu Server: Truffle v5.0.1 (core: 5.0.1)







solidity truffle compilation compiler






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









GaganGagan

1168




1168








  • 1




    You're gonna have to share some more information here. What are the syntax errors? How do you install Truffle on your local machine? How do you install Truffle on the remote machine?
    – goodvibration
    yesterday






  • 2




    BTW, Truffle 4.1.14 relies on solc 0.4.24, while Truffle 5.0.1 relies on solc 0.5.0. Between these two versions of solc there are breaking changes, meaning, you're very much likely to get compilation errors in the latter, but not in the former.
    – goodvibration
    yesterday
















  • 1




    You're gonna have to share some more information here. What are the syntax errors? How do you install Truffle on your local machine? How do you install Truffle on the remote machine?
    – goodvibration
    yesterday






  • 2




    BTW, Truffle 4.1.14 relies on solc 0.4.24, while Truffle 5.0.1 relies on solc 0.5.0. Between these two versions of solc there are breaking changes, meaning, you're very much likely to get compilation errors in the latter, but not in the former.
    – goodvibration
    yesterday










1




1




You're gonna have to share some more information here. What are the syntax errors? How do you install Truffle on your local machine? How do you install Truffle on the remote machine?
– goodvibration
yesterday




You're gonna have to share some more information here. What are the syntax errors? How do you install Truffle on your local machine? How do you install Truffle on the remote machine?
– goodvibration
yesterday




2




2




BTW, Truffle 4.1.14 relies on solc 0.4.24, while Truffle 5.0.1 relies on solc 0.5.0. Between these two versions of solc there are breaking changes, meaning, you're very much likely to get compilation errors in the latter, but not in the former.
– goodvibration
yesterday






BTW, Truffle 4.1.14 relies on solc 0.4.24, while Truffle 5.0.1 relies on solc 0.5.0. Between these two versions of solc there are breaking changes, meaning, you're very much likely to get compilation errors in the latter, but not in the former.
– goodvibration
yesterday












2 Answers
2






active

oldest

votes


















2














Truffle 4.1.14 relies on solc 0.4.24.



Truffle 5.0.1 relies on solc 0.5.0.



Between these two versions of solc there are breaking changes, meaning that you're very much likely to get compilation errors in the latter, which you have not received in the former.



If you don't want to update your contracts to solc 0.5.x, but still be able to compile them with Truffle 5.x, then you can choose the desired version of solc in your Truffle configuration file.



For example, in order to configure truffle to use solc 0.4.24, add this in truffle-config.js:



compilers: {
solc: {
version: "0.4.24"
}
}


This feature is available from Truffle 5.x onward (so don't try it on earlier versions).



See more details in Truffle 5.0.0 release notes for how to bring your own compiler.






share|improve this answer





























    2














    This is probably an issue with Solidity compiler versions.



    You can find out which version of Solidity compiler is used by your local Truffle using this post.



    After that, I would advise you to set your compiler versions explicitly using Truffle configuration.



    When your AWS compiler is in sync with your local compiler, you should be good to go.






    share|improve this answer








    New contributor




    Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.


















    • P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
      – Ivan Andrusenko
      yesterday






    • 1




      Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
      – Gagan
      yesterday






    • 1




      @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
      – Ivan Andrusenko
      yesterday






    • 1




      Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
      – Gagan
      yesterday











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "642"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f65209%2funable-to-run-truffle-compile%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Truffle 4.1.14 relies on solc 0.4.24.



    Truffle 5.0.1 relies on solc 0.5.0.



    Between these two versions of solc there are breaking changes, meaning that you're very much likely to get compilation errors in the latter, which you have not received in the former.



    If you don't want to update your contracts to solc 0.5.x, but still be able to compile them with Truffle 5.x, then you can choose the desired version of solc in your Truffle configuration file.



    For example, in order to configure truffle to use solc 0.4.24, add this in truffle-config.js:



    compilers: {
    solc: {
    version: "0.4.24"
    }
    }


    This feature is available from Truffle 5.x onward (so don't try it on earlier versions).



    See more details in Truffle 5.0.0 release notes for how to bring your own compiler.






    share|improve this answer


























      2














      Truffle 4.1.14 relies on solc 0.4.24.



      Truffle 5.0.1 relies on solc 0.5.0.



      Between these two versions of solc there are breaking changes, meaning that you're very much likely to get compilation errors in the latter, which you have not received in the former.



      If you don't want to update your contracts to solc 0.5.x, but still be able to compile them with Truffle 5.x, then you can choose the desired version of solc in your Truffle configuration file.



      For example, in order to configure truffle to use solc 0.4.24, add this in truffle-config.js:



      compilers: {
      solc: {
      version: "0.4.24"
      }
      }


      This feature is available from Truffle 5.x onward (so don't try it on earlier versions).



      See more details in Truffle 5.0.0 release notes for how to bring your own compiler.






      share|improve this answer
























        2












        2








        2






        Truffle 4.1.14 relies on solc 0.4.24.



        Truffle 5.0.1 relies on solc 0.5.0.



        Between these two versions of solc there are breaking changes, meaning that you're very much likely to get compilation errors in the latter, which you have not received in the former.



        If you don't want to update your contracts to solc 0.5.x, but still be able to compile them with Truffle 5.x, then you can choose the desired version of solc in your Truffle configuration file.



        For example, in order to configure truffle to use solc 0.4.24, add this in truffle-config.js:



        compilers: {
        solc: {
        version: "0.4.24"
        }
        }


        This feature is available from Truffle 5.x onward (so don't try it on earlier versions).



        See more details in Truffle 5.0.0 release notes for how to bring your own compiler.






        share|improve this answer












        Truffle 4.1.14 relies on solc 0.4.24.



        Truffle 5.0.1 relies on solc 0.5.0.



        Between these two versions of solc there are breaking changes, meaning that you're very much likely to get compilation errors in the latter, which you have not received in the former.



        If you don't want to update your contracts to solc 0.5.x, but still be able to compile them with Truffle 5.x, then you can choose the desired version of solc in your Truffle configuration file.



        For example, in order to configure truffle to use solc 0.4.24, add this in truffle-config.js:



        compilers: {
        solc: {
        version: "0.4.24"
        }
        }


        This feature is available from Truffle 5.x onward (so don't try it on earlier versions).



        See more details in Truffle 5.0.0 release notes for how to bring your own compiler.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        goodvibrationgoodvibration

        3,0941821




        3,0941821























            2














            This is probably an issue with Solidity compiler versions.



            You can find out which version of Solidity compiler is used by your local Truffle using this post.



            After that, I would advise you to set your compiler versions explicitly using Truffle configuration.



            When your AWS compiler is in sync with your local compiler, you should be good to go.






            share|improve this answer








            New contributor




            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.


















            • P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
              – Ivan Andrusenko
              yesterday






            • 1




              Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
              – Gagan
              yesterday






            • 1




              @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
              – Ivan Andrusenko
              yesterday






            • 1




              Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
              – Gagan
              yesterday
















            2














            This is probably an issue with Solidity compiler versions.



            You can find out which version of Solidity compiler is used by your local Truffle using this post.



            After that, I would advise you to set your compiler versions explicitly using Truffle configuration.



            When your AWS compiler is in sync with your local compiler, you should be good to go.






            share|improve this answer








            New contributor




            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.


















            • P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
              – Ivan Andrusenko
              yesterday






            • 1




              Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
              – Gagan
              yesterday






            • 1




              @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
              – Ivan Andrusenko
              yesterday






            • 1




              Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
              – Gagan
              yesterday














            2












            2








            2






            This is probably an issue with Solidity compiler versions.



            You can find out which version of Solidity compiler is used by your local Truffle using this post.



            After that, I would advise you to set your compiler versions explicitly using Truffle configuration.



            When your AWS compiler is in sync with your local compiler, you should be good to go.






            share|improve this answer








            New contributor




            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            This is probably an issue with Solidity compiler versions.



            You can find out which version of Solidity compiler is used by your local Truffle using this post.



            After that, I would advise you to set your compiler versions explicitly using Truffle configuration.



            When your AWS compiler is in sync with your local compiler, you should be good to go.







            share|improve this answer








            New contributor




            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            share|improve this answer



            share|improve this answer






            New contributor




            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            answered yesterday









            Ivan AndrusenkoIvan Andrusenko

            364




            364




            New contributor




            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





            New contributor





            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






            Ivan Andrusenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.












            • P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
              – Ivan Andrusenko
              yesterday






            • 1




              Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
              – Gagan
              yesterday






            • 1




              @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
              – Ivan Andrusenko
              yesterday






            • 1




              Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
              – Gagan
              yesterday


















            • P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
              – Ivan Andrusenko
              yesterday






            • 1




              Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
              – Gagan
              yesterday






            • 1




              @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
              – Ivan Andrusenko
              yesterday






            • 1




              Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
              – Gagan
              yesterday
















            P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
            – Ivan Andrusenko
            yesterday




            P. S. It's a bit unrelated, but I would strongly recommend setting a specific compiler version in your source code - source.
            – Ivan Andrusenko
            yesterday




            1




            1




            Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
            – Gagan
            yesterday




            Thanks! It worked. There are no compilation errors but found another error that says, "Error: spawn ENOMEM". Any idea? :/
            – Gagan
            yesterday




            1




            1




            @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
            – Ivan Andrusenko
            yesterday




            @Gagan This is most probably unrelated to Truffle itself, but to NodeJS and the system you run Truffle on. It could mean that there's no swap space enabled on your system. To follow the Stack Exchange guidelines, you should probably ask this question in a separate topic.
            – Ivan Andrusenko
            yesterday




            1




            1




            Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
            – Gagan
            yesterday




            Yeah, you are absolutely right! After few changes it now says, "FATAL ERROR: NewSpace::Rebalance Allocation failed - process out of memory". And thanks, I'll put this in another post with details.
            – Gagan
            yesterday


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ethereum Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f65209%2funable-to-run-truffle-compile%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            An IMO inspired problem

            Management

            Has there ever been an instance of an active nuclear power plant within or near a war zone?