Describe the bug
When you have an existing 0.27 instance and try to upgrade it to the 0.28.0.dev version following the release notes, the documented upgrade procedure will fail with the following error:
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /.../decidim/bin/webpacker
[...]
Tasks: TOP => decidim:webpacker:install
This is because in 0.27 the binstub files were named bin/webpack and bin/webpack-dev-server.
With the 0.28.0.dev version, they are named bin/webpacker and bin/webpacker-dev-server. These files are not automatically available in previous versions. The webpacker installation fails on these lines because of this difference:
|
add_binstub_load_path "bin/webpacker" |
|
add_binstub_load_path "bin/webpacker-dev-server" |
Before those are run, the binstubs need to be generated according to these files:
https://github.com/shakacode/shakapacker/tree/v6.x/lib/install/bin
To Reproduce
- Create a 0.27 instance
- Upgrade it to 0.28.0.dev using the version in git following the release notes
Expected behavior
I would expect the documented upgrade procedure to work properly.
Screenshots
No response
Stacktrace
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /.../decidim/bin/webpacker
/.../.rbenv/versions/3.1.1/bin/bundle:25:in `load'
/.../.rbenv/versions/3.1.1/bin/bundle:25:in `<main>'
Tasks: TOP => decidim:webpacker:install
(See full trace by running task with --trace)
Extra data
- Device:
- Device OS:
- Browser:
- Decidim Version:
- Decidim installation: 0.28.0.dev
Additional context
I could manually fix this by running the following command before the documented Decidim command:
./bin/rails webpacker:install
After both commands succeeded, the assets compilation was still broken. I fixed this by running npm update before running ./bin/webpacker.
The errors I received without updating the NPM packages manually were something along these lines (for all the decidim packs):
ERROR in ../../../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/bundler/gems/decidim-16f18361992a/decidim-accountability/app/packs/entrypoints/decidim_accountability.js 7:0-52
Module not found: Error: Can't resolve 'postcss-loader' in '/.../decidim'
ERROR in ../../../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/bundler/gems/decidim-16f18361992a/decidim-admin/app/packs/entrypoints/decidim_admin.js 38:0-40
Module not found: Error: Can't resolve 'postcss-loader' in '/.../decidim'
Describe the bug
When you have an existing 0.27 instance and try to upgrade it to the 0.28.0.dev version following the release notes, the documented upgrade procedure will fail with the following error:
This is because in 0.27 the binstub files were named
bin/webpackandbin/webpack-dev-server.With the 0.28.0.dev version, they are named
bin/webpackerandbin/webpacker-dev-server. These files are not automatically available in previous versions. The webpacker installation fails on these lines because of this difference:decidim/decidim-core/lib/tasks/decidim_webpacker_tasks.rake
Lines 54 to 55 in e4f5f83
Before those are run, the binstubs need to be generated according to these files:
https://github.com/shakacode/shakapacker/tree/v6.x/lib/install/bin
To Reproduce
Expected behavior
I would expect the documented upgrade procedure to work properly.
Screenshots
No response
Stacktrace
Extra data
Additional context
I could manually fix this by running the following command before the documented Decidim command:
After both commands succeeded, the assets compilation was still broken. I fixed this by running
npm updatebefore running./bin/webpacker.The errors I received without updating the NPM packages manually were something along these lines (for all the decidim packs):