After the latest update (ERPNext v10.0.23/Frappe v10.0.25), I am experiencing a dependency issue. Running
$ bench update
works, but raises several errors like this:
Cannot babelify /home/frappe/frappe-bench/apps/erpnext/erpnext/stock/dashboard/item_dashboard.js
ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "base" at 0, attempted to resolve relative to "/home/frappe/frappe-bench/sites"
at /home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (/home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/home/frappe/frappe-bench/apps/frappe/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at babelify (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:161:16)
at get_compiled_file (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:148:18)
I cannot seem to find the dependency Unknown plugin “transform-object-rest-spread”, anyone has any clue?
Other than building, the installation works well. All commands such as bench update, bench update --requirements, bench migrate, bench restart work fine without any warnings or the like. Only bench build fails with the above error and the output in sites/assets/js/ is throwing various errors. I can work around this by replacing the sites/assets/js with working files from another server and thereby getting the system to work normally, but that obviously only works as long as the system does not rebuild and overwrites the files.
NodeJS seems to be ok (apt list --installed nodejs): nodejs/unknown,now 6.13.0-1nodesource1 amd64 [installed]
Running npm list | grep babel returns babel@6.23.0 which should be ok… Yet, there is a note when running npm install babel, saying babel@6.23.0: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers Installing npm install babel-cli works, but bench build still throws ReferenceError: Unknown plugin “transform-object-rest-spread”