SorinSologics2019SorinSologics2019 MemberComments: 12 Received thanks: 0 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: 228 Received thanks: 34 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: 7 Received thanks: 0 Member since: December 2017

    I got the same error. Any solutions?

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

    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 11

    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: 12 Received thanks: 0 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: 606 Received thanks: 20 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?

Sign In or Register to comment.