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
    Jan 8 at 11:48






  • 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
    Jan 8 at 11:49


















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
    Jan 8 at 11:48






  • 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
    Jan 8 at 11:49
















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 Jan 8 at 11:29









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
    Jan 8 at 11:48






  • 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
    Jan 8 at 11:49
















  • 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
    Jan 8 at 11:48






  • 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
    Jan 8 at 11:49










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
Jan 8 at 11:48





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
Jan 8 at 11:48




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
Jan 8 at 11:49







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
Jan 8 at 11:49












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
























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

      – Ivan Andrusenko
      Jan 8 at 11:55






    • 1





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

      – Gagan
      Jan 8 at 12:03






    • 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
      Jan 8 at 12:07






    • 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
      Jan 8 at 12:12











    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 Jan 8 at 11:54









        goodvibrationgoodvibration

        3,2801821




        3,2801821























            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
























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

              – Ivan Andrusenko
              Jan 8 at 11:55






            • 1





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

              – Gagan
              Jan 8 at 12:03






            • 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
              Jan 8 at 12:07






            • 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
              Jan 8 at 12:12
















            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
























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

              – Ivan Andrusenko
              Jan 8 at 11:55






            • 1





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

              – Gagan
              Jan 8 at 12:03






            • 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
              Jan 8 at 12:07






            • 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
              Jan 8 at 12:12














            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













            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












            share|improve this answer



            share|improve this answer










            answered Jan 8 at 11:50









            Ivan AndrusenkoIvan Andrusenko

            364




            364













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

              – Ivan Andrusenko
              Jan 8 at 11:55






            • 1





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

              – Gagan
              Jan 8 at 12:03






            • 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
              Jan 8 at 12:07






            • 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
              Jan 8 at 12:12



















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

              – Ivan Andrusenko
              Jan 8 at 11:55






            • 1





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

              – Gagan
              Jan 8 at 12:03






            • 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
              Jan 8 at 12:07






            • 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
              Jan 8 at 12:12

















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

            – Ivan Andrusenko
            Jan 8 at 11:55





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

            – Ivan Andrusenko
            Jan 8 at 11:55




            1




            1





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

            – Gagan
            Jan 8 at 12:03





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

            – Gagan
            Jan 8 at 12:03




            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
            Jan 8 at 12:07





            @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
            Jan 8 at 12:07




            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
            Jan 8 at 12:12





            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
            Jan 8 at 12:12


















            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.




            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

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix