Failed upgrade v3.0.6

Hi, I’ve been encountering an issue while trying to rebuild my Discourse instance, and I could use some assistance in resolving it. The error message I’m encountering during the rebuild process is as follows:

Build Error (broccoli-persistent-filter:Babel > [Babel: @ember/test-helpers]) in @ember/test-helpers/-internal/build-registry.js

[BABEL]: --- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.
 (While processing: /var/www/discourse/app/assets/javascripts/node_modules/@babel/preset-env/lib/index.js)Error: [BABEL]: --- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.
 (While processing: /var/www/discourse/app/assets/javascripts/node_modules/@babel/preset-env/lib/index.js)
    at Object.<anonymous> (/var/www/discourse/app/assets/javascripts/node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-private-property-in-object/lib/index.js:28:7)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/var/www/discourse/app/assets/javascripts/node_modules/@babel/preset-env/lib/available-plugins.js:62:46)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/var/www/discourse/app/assets/javascripts/node_modules/@babel/preset-env/lib/filter-items.js:11:25)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/var/www/discourse/app/assets/javascripts/node_modules/@babel/preset-env/lib/index.js:16:20)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)


Stack Trace and Error Report: /tmp/error.dump.1a53cc3bcbb1dcc06964bb973fde8a41.log
error Command failed with exit code 1.
I, [2023-09-27T17:55:58.994191 #1]  INFO -- : yarn run v1.22.19
$ /var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
WARNING: Node v18.17.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
Environment: production
cleaning up...
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I, [2023-09-27T17:55:58.995178 #1]  INFO -- : Terminating async processes
I, [2023-09-27T17:55:58.995604 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
2023-09-27 17:55:58.995 UTC [42] LOG:  received fast shutdown request
I, [2023-09-27T17:55:58.996052 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 133
133:signal-handler (1695837358) Received SIGTERM scheduling shutdown...
2023-09-27 17:55:59.020 UTC [42] LOG:  aborting any active transactions
2023-09-27 17:55:59.024 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2023-09-27 17:55:59.025 UTC [46] LOG:  shutting down
2023-09-27 17:55:59.089 UTC [42] LOG:  database system is shut down
133:M 27 Sep 2023 17:55:59.096 # User requested shutdown...
133:M 27 Sep 2023 17:55:59.096 * Saving the final RDB snapshot before exiting.
133:M 27 Sep 2023 17:55:59.152 * DB saved on disk
133:M 27 Sep 2023 17:55:59.152 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 4285 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 

This error seems to be related to @babel/plugin-proposal-private-property-in-object , and it suggests that something is trying to import this package without it being properly declared in the dependencies or devDependencies within the package.json file.

I’ve tried troubleshooting this issue on my own, but I’m unsure about the specific component or configuration causing this problem. Moreover, I have commented out all plugins to ensure that they are not the cause of the problem.
Any insights or recommendations would be greatly appreciated.

It turns out this problem exists in versions v3.0.x.
I had to upgrade to v3.1.x, and the rebuild is succeeding now.

3 Likes