Home > Back-end >  Shopware 6: Missing node_modules in Storefront Compilation
Shopware 6: Missing node_modules in Storefront Compilation

Time:09-16

When I try to compile shopware 6 with

./bin/build-storefront.sh

i get an error message, that the Chromium Download could not be done.

npm ERR! code 1
npm ERR! path /home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! ERROR: Failed to set up Chromium r950341! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! [Error: EINVAL: invalid argument, realpath '/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer/.local-chromium/linux-950341'] {
npm ERR!   errno: -22,
npm ERR!   code: 'EINVAL',
npm ERR!   syscall: 'realpath',
npm ERR!   path: '/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer/.local-chromium/linux-950341'
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2022-09-14T08_03_06_847Z-debug.log

(I replaced the real username and shopname folders with username here.)

I checked the folder /home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/, but it is empty.

Should I run npm install in the shoproot?

Is it save, to run npm install in an advanced developed system, or will it break things?

Sure I'll make a backup first, but I am not sure, if I can run it anyway. The shop is a staging system of a complete running shopware system with a couple of extensions and custom themes.

CodePudding user response:

There's an environment variable you can set to skip the download. Execute this before running the storefront build script.

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
  • Related