5

I have some questions according to the installation of Vue-storefront on my local. I am using Mac OS 10.13.4 and node version 8.11.5, npm version 5.6 But while building storefront npm, it returns an error.

 [Error: Can't build storefront npm.                                                                                │
│     at Promise (/Volumes/Works/web/vue/vuestorefront/vue-storefront/core/scripts/installer.js:412:16)             │
│     at new Promise (<anonymous>)                                                                                  │
│     at Storefront.npmBuild (/Volumes/Works/web/vue/vuestorefront/vue-storefront/core/scripts/installer.js:408:12) │
│     at <anonymous>                                                                                                │
│                                                                                                                   │
│ Please check log file for details: /Volumes/Works/web/vue/vuestorefront/vue-storefront/var/log/install.log][1]        

Why this happens?

Luke
  • 2,350
  • 6
  • 26
  • 41
  • 1
    [Your answer is in the documentation](https://github.com/DivanteLtd/vue-storefront/blob/master/doc/FAQ%20and%20Receipes.md#how-to-prevent-error-cant-build-storefront-npm). Have you tried this yet? – Ohgodwhy Oct 14 '18 at 15:15

2 Answers2

2

As in https://docs.vuestorefront.io/guide/basics/recipes.html#how-to-prevent-an-error-can%E2%80%99t-build-storefront-npm

The error "Can't build storefront npm" appears because npm can't automatically install required modules. To prevent this error, you should manually install those modules before running the installer. It's easy:

git clone https://github.com/DivanteLtd/vue-storefront.git vue-storefront && cd vue-storefront
npm install
npm install vue-carousel vue-no-ssr
npm run build # check if no errors
npm run installer
Jan Myszkier
  • 2,714
  • 1
  • 16
  • 23
0

This is probably because of the yarn.lock file which locks certain version of dependencies. Try these steps:

  1. delete the yarn.lock file
  2. delete the node_modules folder
  3. run yarn (so the dependencies are downloaded again - you will see a lot of warnings which is not bad, although your project will not be future proof)
  4. run yarn installer again
supi
  • 2,172
  • 18
  • 15