magesuite / theme-creativeshop

Open Software License 3.0
38 stars 22 forks source link

Error trying to generate the CreativeStyle theme #8

Closed nandopsilva closed 3 years ago

nandopsilva commented 4 years ago

Hello!

Error trying to generate the CreativeStyle theme. See below:

`# yarn install yarn install v1.22.4 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.11: The platform "linux" is incompatible with this module. info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning "@creativestyle/magesuite-frontend-builder > tslint-plugin-prettier@2.1.0" has incorrect peer dependency "tslint@^5.0.0". warning "@creativestyle/magesuite-frontend-builder > tslint-eslint-rules-recommended > tslint-eslint-rules@5.4.0" has incorrect peer dependency "tslint@^5.0.0". [4/4] Building fresh packages... [-/7] ⠂ waiting... [2/7] ⠂ gifsicle [-/7] ⠂ waiting... [-/7] ⠂ waiting... warning Error running install script for optional dependency: "/magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle: Command failed. Exit code: 1 Command: node lib/install.js Arguments: Directory: /magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle Output: ⚠ Response code 404 (Not Found) ⚠ gifsicle pre-build test failed ℹ compiling from source ✖ Error: Command failed: /bin/sh -c ./configure --disable-gifview --disable-gifdiff --prefix=\"/magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle/vendor\" --bindir=\"/magento/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle/vendor\" /bin/sh: ./configure: Permission denied

at /magento/vendor/creativestyle/theme-creativeshop/node_modules/bin-build/node_modules/exsuccess Saved lockfile.

Done in 37.03s. `

after

`yarn build yarn run v1.22.4 $ gulp build --env production [19:30:05] gulp-imagemin: Couldn't load default plugin "gifsicle" [19:30:06] Using gulpfile /magento/vendor/creativestyle/theme-creativeshop/gulpfile.js [19:30:06] Starting 'build'... [19:30:06] Starting 'clean'... [19:30:06] Finished 'clean' after 38 ms [19:30:06] Starting 'collectViewXml'... [19:30:06] Finished 'collectViewXml' after 59 ms [19:30:06] Starting 'buildWebpack'... [19:30:06] Starting 'copyHtml'... [19:30:06] Starting 'copyScripts'... [19:30:06] Starting 'copyImages'... [19:30:06] Starting 'copyUnchanged'... [19:30:08] 'copyImages' errored after 1.64 s [19:30:08] TypeError in plugin "gulp-imagemin" Message: fn is not a function Details: fileName: /magento/vendor/creativestyle/theme-creativeshop/src/preview.png domainEmitter: [object Object] domainThrown: false

[19:30:08] 'build' errored after 1.74 s [19:30:08] The following tasks did not complete: buildWebpack, copyHtml, copyScripts, copyUnchanged [19:30:08] Did you forget to signal async completion? error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

krzksz commented 4 years ago

Hello @nandopsilva! Can you please try removing node_modules directory and reinstalling everything again? This error with image optimizers seems to be happening randomly from time to time.

nandopsilva commented 4 years ago

Hello @krzksz !

Thank you for your support.

tried several times to generate teme-creativeshop by removing node_modules without success.

I tried a new installation of Magento and the same error occurs.

Tried using

npm install --cache /tmp/empty-cache npm cache verify npm i -g npm and npm config set optional false

but without success...

Below my versions of mpn and yarn

[theme-creativeshop]# npm -v 6.13.4

[theme-creativeshop]# yarn -v 1.22.4

Thank you again!

Best Regards, Fernando Silva

nandopsilva commented 4 years ago

Hello @krzksz !

I tried reinstalling nodejs and yarn on another server and the outputs are always the same.

`[theme-creativeshop]# sudo yarn install && yarn build yarn install v1.22.4 info No lockfile found. [1/4] Resolving packages... warning @creativestyle/magesuite-frontend-builder > node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning @creativestyle/magesuite-frontend-builder > node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning @creativestyle/magesuite-frontend-builder > gulp-sourcemaps > css > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning @creativestyle/magesuite-frontend-builder > gulp-sourcemaps > css > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning @creativestyle/magesuite-frontend-builder > gulp-sourcemaps > css > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning @creativestyle/magesuite-frontend-builder > stylelint > postcss-markdown > remark > unified > @types/vfile > @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed. [2/4] Fetching packages... info fsevents@1.2.12: The platform "linux" is incompatible with this module. info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning "@creativestyle/magesuite-frontend-builder > tslint-eslint-rules-recommended > tslint-eslint-rules@5.4.0" has incorrect peer dependency "tslint@^5.0.0". [4/4] Building fresh packages... [-/8] ⠐ waiting... [2/8] ⠐ gifsicle [-/8] ⠐ waiting... [-/8] ⠐ waiting... warning Error running install script for optional dependency: "public_html/z1/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle: Command failed. Exit code: 1 Command: node lib/install.js Arguments: Directory: /public_html/z1/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle Output: ⚠ Response code 404 (Not Found) ⚠ gifsicle pre-build test failed ℹ compiling from source ✖ Error: Command failed: /bin/sh -c ./configure --disable-gifview --disable-gifdiff --prefix=\"/public_html/z1/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle/vendor\" --bindir=\"/public_html/z1/vendor/creativestyle/theme-creativeshop/node_modules/gifsicle/vendor\" /bin/sh: ./configure: Permission denied

at /public_html/z1/vendor/creativestyle/theme-creativeshop/node_modules/binsuccess Saved lockfile.

Done in 42.45s. yarn run v1.22.4 $ gulp build --env production [13:08:38] gulp-imagemin: Couldn't load default plugin "gifsicle" [13:08:38] Using gulpfile ~/public_html/z1/vendor/creativestyle/theme-creativeshop/gulpfile.js [13:08:38] Starting 'build'... [13:08:38] Starting 'clean'... [13:08:38] Finished 'clean' after 51 ms [13:08:38] Starting 'collectViewXml'... [13:08:38] Finished 'collectViewXml' after 62 ms [13:08:38] Starting 'buildWebpack'... [13:08:38] Starting 'copyHtml'... [13:08:38] Starting 'copyScripts'... [13:08:38] Starting 'copyImages'... [13:08:38] Starting 'copyUnchanged'... [13:08:40] 'copyImages' errored after 1.44 s [13:08:40] TypeError in plugin "gulp-imagemin" Message: fn is not a function Details: fileName: /public_html/z1/vendor/creativestyle/theme-creativeshop/src/preview.png domainEmitter: [object Object] domainThrown: false

[13:08:40] 'build' errored after 1.56 s [13:08:40] The following tasks did not complete: buildWebpack, copyHtml, copyScripts, copyUnchanged [13:08:40] Did you forget to signal async completion? error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Any trick to make it work?

Thank you again!

Best Regards, Fernando Silva

krzksz commented 4 years ago

Hey Fernando!

Could you provide me your Node.js, NPM and Yarn versions that you are using? Also this one looks simillar to your issue: https://github.com/imagemin/imagemin-gifsicle/issues/37

nandopsilva commented 4 years ago

Hello @krzksz !

The requested versions follow.

node -v

v12.16.1

npm -v

6.13.4

yarn -v

1.22.4

I will try the pointed solution.

Thank you again!

nandopsilva commented 4 years ago

Hello @krzksz !

Thank you for pointing the way.

After restoring a backup of the node_modules folder from a previous installation, I was able to successfully generate the theme.

I believe that the new versions of the modules in the mpn repository have some bugs, mainly with imagemin/imagemin-gifsicle.

I suggest uploading the node_modules folder that you use for the theme-creativeshop repository.

Thank you for your help.

Best Regards, Fernando Silva

krzksz commented 4 years ago

Hello @nandopsilva, To resolve this issue please make sure to install autoconf and automake system dependencies. This has helped in our case.

timonsliepenbeek commented 4 years ago

Hello @nandopsilva, To resolve this issue please make sure to install autoconf and automake system dependencies. This has helped in our case.

Hi @krzksz,

I have tried the latter but both autoconf and automake are already installed on my machine - though I'm getting the same error. I have tried renaming the node_modules directory and installing it again but to no avail.

nandopsilva commented 4 years ago

Hello @krzksz ,

I checked that the gifsicle@5.1.0 module binaries are no longer available for linux.

Therefore, it is not possible to generate the Creativeshop Theme. I tried it manually, but the images on the frontend don't load.

Is there an alternative to the gifsicle@5.1.0 plugin?

Kind regards, Fernando Silva

Bashev commented 4 years ago

I installing gifsicle@^4 and theme generation works fine. Fix here - #38

Problem with images is related to php version (if you used php 7.4) and is in content-contructor-frontend repository https://github.com/magesuite/content-constructor-frontend/pull/6

nandopsilva commented 3 years ago

Hello @Bashev!

Thanks for the tip.

I installed gifsicle@4 and it worked for me. The error can be closed.

Thank you very much!

Kind Regards, Fernando Silva