Rahul Barot
Rahul Barot

Reputation: 239

Shopware 6 development-template installation "frontend open as broken"

I am creating the plugin in Shopware 6.So i have installed "development-template" reference from this question

Shopware 6 Command './psh.phar administration:build.' is not working

After following all the steps for installation when i opened front-end it is broken , where as back-end is working fine. broken front-end(image)

I have found that "./psh.phar storefront:build" command is not working.It causes node.js error shown as below

/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/build/utils.js:116
    } catch {
            ^

SyntaxError: Unexpected token {
    at NativeCompileCache._moduleCompile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/build/webpack.base.config.js:6:15)
    at Module._compile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/webpack.config.js:23:5)
    at Module._compile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:116:13)
    at requireConfig (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:118:6)
    at /var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:125:17
    at Array.forEach (<anonymous>)
    at module.exports (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:123:15)
    at yargs.parse (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/cli.js:71:45)
    at Object.parse (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
    at /var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/cli.js:49:8
    at Object.<anonymous> (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/cli.js:365:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] production: `NODE_ENV=production webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rahul/.npm/_logs/2019-09-24T09_05_58_383Z-debug.log

Execution aborted, a subcommand failed!

i think solving this can fix front-end broken error.

Upvotes: 4

Views: 1026

Answers (1)

Rahul Barot
Rahul Barot

Reputation: 239

After updating node and npm to latest version, its working now.I think the error was with nodejs.

Upvotes: 1

Related Questions