[ERROR] An error occurred while running an Ionic CLI hook defined in ./ionic.config.json.
Hook: serve:before
File: /srv/libraries/app-ionic/scripts/install-custom.js
Error [ERR_REQUIRE_ESM]: require() of ES Module /srv/libraries/app-ionic/scripts/serve-before.js from
/srv/libraries/app-ionic/node_modules/@ionic/cli/lib/hooks.js not supported.
Instead change the require of install-custom.js in
/srv/libraries/app-ionic/node_modules/@ionic/cli/lib/hooks.js to a dynamic import() which is available in
all CommonJS modules.
at ServeBeforeHook.loadHookFn (/srv/libraries/app-ionic/node_modules/@ionic/cli/lib/hooks.js:73:24)
Switching back to require and module.exports style nodejs is not possible, because of the project type in the package.json.
When using ionic + vue, the hooks
serve:before
scripts defined inionic.config.json
cannot run.ionic.config.json
serve-before.js:
This setup generates the following error:
Switching back to
require
andmodule.exports
style nodejs is not possible, because of the projecttype
in thepackage.json
.