Codein-Labs / ibexa-seo-toolkit

MIT License
11 stars 3 forks source link

Upgrade to Ibexa 3.3.16 #19

Closed mrk-te closed 1 year ago

mrk-te commented 2 years ago

After upgrading Ibexa from 3.3.12 to 3.3.16 including the following yarn packages , the post-install-cmd throws an error

"@symfony/webpack-encore": "^1.7.0",
"@babel/preset-react": "^7.0.0",
"core-js": "^3.0.0",
"regenerator-runtime": "^0.13.2",
"webpack-notifier": "^1.6.0",
"react-collapsible": "^2.5.0",
"sass": "^1.49.7",
"sass-loader": "^12.5.0",
"file-loader": "^6.0.0"

The error occurs while running bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains and looks like

!!    [webpack-cli] Failed to load '/app/ezplatform/webpack.config.js' config      
!!    [webpack-cli] Error: ENOENT: no such file or directory, scandir '/app/ezpla  
!!    tform/public/assets/translations'                                            
!!        at Object.readdirSync (fs.js:1047:3)                                     
!!        at Object.<anonymous> (/app/ezplatform/vendor/codein/ibexa-seo-toolkit/  
!!    bundle/Resources/encore/codein.js.config.js:9:4)                             
!!        at Module._compile (internal/modules/cjs/loader.js:1085:14)              
!!        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:1  
!!    0)                                                                           
!!        at Module.load (internal/modules/cjs/loader.js:950:32)                   
!!        at Function.Module._load (internal/modules/cjs/loader.js:790:12)         
!!        at Module.require (internal/modules/cjs/loader.js:974:19)                
!!        at require (internal/modules/cjs/helpers.js:93:18)                       
!!        at Object.<anonymous> (/app/ezplatform/vendor/codein/ibexa-seo-toolkit/  
!!    bundle/Resources/encore/ez.config.js:2:22)                                   
!!        at Module._compile (internal/modules/cjs/loader.js:1085:14) {            
!!      errno: -2,                                                                 
!!      syscall: 'scandir',                                                        
!!      code: 'ENOENT',                                                            
!!      path: '/app/ezplatform/public/assets/translations'                         
!!    }                                                                            
!!    error Command failed with exit code 2.                     
mrk-te commented 2 years ago

As quick fix I used make-dir to create the missing directory as first step in the webpack.config.js

const makeDir = require('make-dir');
makeDir.sync('./public/assets');
makeDir.sync('./public/assets/translations');

const Encore = require('@symfony/webpack-encore');

The translations are dumped correctly.

mrk-te commented 1 year ago

Issue is now documented.