OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Install Oro Commerce 4.1

This topic contains 17 replies, has 3 voices, and was last updated by  aman.srivastava462 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #41363

    aman.srivastava462
    Participant

    I am installing orocommerce 4.1 but always i am getting issue, like when i have run the command i will get this issue,
    php ./bin/console oro:install –env=prod –timeout=1200

    i will get this error-
    pfa- screenshoterror.png

    when I have run the command:
    php bin/console oro:assets:install –env=prod
    i will get the error:
    pfa- screenshoterror1.png

    Attachments:
    1. screenshotError-128x72
    2. screenshotError2-128x72
Viewing 15 replies - 1 through 15 (of 17 total)
  • Author
    Replies
  • #41369
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Hi Aman,
    Make sure you have enough memory on a web server where you installing an application. The error occurs because the process is not able to consume enough memory.

    #41370

    aman.srivastava462
    Participant

    Hello Andrey,
    as i have checked, i have 49 of gb space available at server, so i think this is not cause.
    there is some other reason is there any doc regarding the requirement of instaling orocommerce 4.1

    #41373
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    By memory, I mean RAM, not disk space.

    #41398

    aman.srivastava462
    Participant

    Hello Andrey,

    Now i am getting this error,

    While installing, could you please assist,

    Assets has not been installed! Please run “php bin/console oro:assets:install”.
    Error during install assets:

    In Process.php line 1250:

    The process “‘/usr/local/bin/node’ ‘vendor/oro/platform/build//node_modules
    /webpack/bin/webpack.js’ ‘–hide-modules’ ‘–mode=production’ ‘–env.stats=
    ‘ ‘–env.symfony=prod’ ‘–colors'” exceeded the timeout of 900 seconds.

    Best Regards

    #41399

    aman.srivastava462
    Participant

    hello Andrey,

    any update about the previous question.
    and also i have one more question.
    In past project i was using requirejsbundle for my project, now i am getting issue because it is removed in Orocommerce4.1 could you please let me know now how can i use require in twig.

    #41400

    aman.srivastava462
    Participant

    and also I am getting loadModules is not defined error, could you please let me know how can I defined loadmodules.

    #41401
    Hryhorii Hrebiniuk
    Hryhorii Hrebiniuk
    Participant

    Hi,

    May be this article will help you https://doc.oroinc.com/backend/configuration/yaml/jsmodules/

    Regarding loadModules, it is available once main JS is loaded
    <script type="text/javascript" src="/layout-build/default/app.js?version=f86bacfe"></script>
    On FrontStore it is included at the end of the page, under the main content.

    #41402

    aman.srivastava462
    Participant

    Hello Hryhorii,

    Please help I have loaded this js module, now getting error

    my route is: seller/products/add
    and in app.js it is searching for route: seller/products/index%200

    Error getting in console

    app.js?version=c7e3df60:711 Uncaught (in promise) Error: Unable to load routes from “undefined”
    at app.js?version=c7e3df60:711
    at async Promise.all (index 0)

    #41404
    Hryhorii Hrebiniuk
    Hryhorii Hrebiniuk
    Participant

    The error throw from here https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/NavigationBundle/Resources/public/js/routes-loader.js#L22

    That means that routes loader does not have configuration yet. Make sure your inline code is defined in HTML after configuration definition:

    https://github.com/oroinc/customer-portal/blob/master/src/Oro/Bundle/FrontendBundle/Resources/views/layouts/blank/page/js_modules_config.html.twig#L108

    But it is highly recommended to avoid writing inline code. Develop your code as page components to avoid such problems. See https://doc.oroinc.com/master/frontend/javascript/ and https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/UIBundle/Resources/doc/reference/page-component.md

    #41405

    aman.srivastava462
    Participant

    Hello but i am getting error,

    when i am using loadmodules syntax like this,

    loadModules([‘jquery’], function ($) {
    $(‘select[name^=”oro_product_step_one[type]”] option[value=”configurable”]’).remove();
    });
    then getting error while created loadmodules like jquery,
    Unable to load routes from “undefined”, where i need pass route in this.
    the code is,

    {% import ‘@OroAsset/Asset.html.twig’ as Asset %}
    {{ Asset.js(‘build/app.js’) }}

    loadModules([‘jquery’], function ($) {
    $(‘select[name^=”oro_product_step_one[type]”] option[value=”configurable”]’).remove();
    });

    #41406

    aman.srivastava462
    Participant

    Hello Hryhorri,

    please find attached screenshot, could you please help me to solve the issue, I would be very thankful.

    Attachments:
    1. Screenshot-from-2020-02-28-16-27-30-128x72
    #41408
    Hryhorii Hrebiniuk
    Hryhorii Hrebiniuk
    Participant

    You are missing config definition
    {% placeholder js_modules_config %}

    it has to be before
    {{ Asset.js('build/app.js') }}

    loadModules is available only after application has started. But configuration with routes definition is needed for application to start. That’s why you get an error even for requiring jquery.

    Once again, do not use inline scripts. Develop your code as components and views (see documentation), it will ensure, that your code lives in application life cycles. Properly initialized and properly disposed when it is time.

    #41411

    aman.srivastava462
    Participant

    Hello Hryhorii

    thanks for the information but I have already added this, but still getting route error.

    #41412
    Hryhorii Hrebiniuk
    Hryhorii Hrebiniuk
    Participant

    this template
    https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/UIBundle/Resources/views/Assets/oro_js.html.twig

    is included here https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/UIBundle/Resources/views/Default/index.html.twig#L26

    so no need for
    loadModules(['oroui/js/app']);|
    and
    loadModules(['orouser/js/init-user', ...]);

    Once again, consider reading documentation and write your code properly.

    loadModules — is added temporary, to support deprecated code. In a future it going to be removed from global scope at all.

    #41413

    aman.srivastava462
    Participant

    but what about this line of code,

    loadModules([‘oroui/js/mobile/layout’], function (layout) {layout.init();});

    ??

Viewing 15 replies - 1 through 15 (of 17 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No