SorinSologics2019SorinSologics2019 MemberComments: 15 Received thanks: 1 Member since: July 2019

Hello,

We are trying to build storefront using these commands:

php bin/console bundle:dump
PROJECT_ROOT=__ABSOLUTE_PATH_TO_PROJECT_ROOT__/ npm --prefix vendor/shopware/storefront/Resources/ run production
php bin/console theme:compile
php bin/console assets:install

But we get this error even if we install the module (npm install app-module-path --save);

Error: Cannot find module 'app-module-path'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)

Does anyone have an ideea how we can solve this?

Thank you in advance.

Best regards,

Sorin

 

Answers

  • MisengoMisengo MemberComments: 262 Received thanks: 35 Member since: December 2015

    Hello,

    We are trying to build storefront using these commands:

    php bin/console bundle:dump
    PROJECT_ROOT=__ABSOLUTE_PATH_TO_PROJECT_ROOT__/ npm --prefix vendor/shopware/storefront/Resources/ run production
    php bin/console theme:compile
    php bin/console assets:install

    But we get this error even if we install the module (npm install app-module-path --save);

    Error: Cannot find module 'app-module-path'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
        at Function.Module._load (internal/modules/cjs/loader.js:562:25)
        at Module.require (internal/modules/cjs/loader.js:690:17)
    

    Does anyone have an ideea how we can solve this?

    Thank you in advance.

    Best regards,

    Sorin

     

    Did you find the solution for it? 

  • AdelbertAdelbert MemberComments: 20 Received thanks: 1 Member since: December 2017

    I got the same error. Any solutions?

  • GabryjelskiGabryjelski MemberComments: 4 Received thanks: 1 Member since: February 2020

    I stumbled across the same error.

    It seems that the storefront depends on some libs, which are included in the admistration parts.

    So you need to build the administration first

    bin/build-administration.sh

    before building the storefront

    bin/build-storefront.sh

     

    Thanked by 1Adelbert
  • MagmaHurricaneMagmaHurricane MemberComments: 1 Received thanks: 0 Member since: February 2020

    Hello,

    We are trying to build storefront using these myprepaidcenter commands:

    php bin/console bundle:dump
    PROJECT_ROOT=__ABSOLUTE_PATH_TO_PROJECT_ROOT__/ npm --prefix vendor/shopware/storefront/Resources/ run production
    php bin/console theme:compile
    php bin/console assets:install

    But we get this error even if we install the module (npm install app-module-path --save);

    Error: Cannot find module 'app-module-path'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
        at Function.Module._load (internal/modules/cjs/loader.js:562:25)
        at Module.require (internal/modules/cjs/loader.js:690:17)
    

    Does anyone have an ideea how we can solve this?

    Thank you in advance.

    Facing the same problem, please help me.

  • SorinSologics2019SorinSologics2019 MemberComments: 15 Received thanks: 1 Member since: July 2019

    Hello.

    You should use the psh commands like ./psh.phar administration:build and storefront:build.

    But before running these you need to run administration:init and storefront:init

    Regards,

    Sorin

  • FloC3FloC3 MemberComments: 1018 Received thanks: 62 Member since: October 2017

    @SorinSologics2019

    but this ./psh.phar commands only run in develop mode, doesn't they?

    what about if I want to build my storefront in production mode?

  • WernerBuWernerBu MemberComments: 154 Received thanks: 15 Member since: February 2018

    Hi,

    not bad, it seems that

    bin/console theme:compile

    now works with the production version of Shopware, i.e. with install_6.1.4_1584369563.

    In my plugin i can use Sass-Files to change the Theme, thanks.

    (... or was that more of a coincidence and Shopware doesn't even want it...)

    I also think that this should be possible in any case, also in the future, not that Shopware will change anything there again. I would not like to use the development version. I want to develop with the same version that is live.

    Best regards,

    Werner.

  • WernerBuWernerBu MemberComments: 154 Received thanks: 15 Member since: February 2018

    Hi,

    bin/console theme:compile doesn't only compile the scss-File's.

    Is it possible to compile the Javascript-Plugin's, that is the extension of the Shopware 6 Plugin class.

    I'm using the production environment.

    Thanks and best regards,

    Werner.

     

Sign In or Register to comment.