5.x-dev Fresh Install Will Not Compile ./console vue:build CoreHome

I followed the Development setup instructions at https://developer.matomo.org/guides/getting-started-part-1 and got it running and confirmed it was tracking pages on localhost. It installed 5.0 RC 6. ./console vue:build CoreHome worked on that. I ran the UI upgrade to RC7, then got the following error.

Perhaps the UI upgrade is the problem, but I cannot figure out how to get RC 7 from git.


<code>
/var/www/matomo 5.x-dev !12008 ?3 ❯ ./console vue:build CoreHome                                                                   root@LenovaIPG3 14:45:29
Building CoreHome...
 ERROR  Error: Cannot find module '@babel/plugin-proposal-object-rest-spread'
Require stack:
- /var/www/matomo/node_modules/@babel/core/lib/config/files/plugins.js
- /var/www/matomo/node_modules/@babel/core/lib/config/files/index.js
- /var/www/matomo/node_modules/@babel/core/lib/index.js
- /var/www/matomo/node_modules/@vue/cli-plugin-babel/index.js
- /var/www/matomo/node_modules/@vue/cli-service/lib/Service.js
- /var/www/matomo/node_modules/@vue/cli-service/bin/vue-cli-service.js
- /var/www/matomo/plugins/CoreVue/scripts/cli-service-proxy.js
Error: Cannot find module '@babel/plugin-proposal-object-rest-spread'
Require stack:
- /var/www/matomo/node_modules/@babel/core/lib/config/files/plugins.js
- /var/www/matomo/node_modules/@babel/core/lib/config/files/index.js
- /var/www/matomo/node_modules/@babel/core/lib/index.js
- /var/www/matomo/node_modules/@vue/cli-plugin-babel/index.js
- /var/www/matomo/node_modules/@vue/cli-service/lib/Service.js
- /var/www/matomo/node_modules/@vue/cli-service/bin/vue-cli-service.js
- /var/www/matomo/plugins/CoreVue/scripts/cli-service-proxy.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at resolve (node:internal/modules/cjs/helpers:127:19)
    at resolveStandardizedName (/var/www/matomo/node_modules/@babel/core/lib/config/files/plugins.js:111:7)
    at resolvePlugin (/var/www/matomo/node_modules/@babel/core/lib/config/files/plugins.js:55:10)
    at loadPlugin (/var/www/matomo/node_modules/@babel/core/lib/config/files/plugins.js:63:20)
    at loadPlugin.next (<anonymous>)
    at createDescriptor (/var/www/matomo/node_modules/@babel/core/lib/config/config-descriptors.js:187:16)
    at createDescriptor.next (<anonymous>)
    at evaluateSync (/var/www/matomo/node_modules/gensync/index.js:251:28)
    at /var/www/matomo/node_modules/gensync/index.js:31:34
Failed:
</code>

Hi Jim,
The @babel/plugin-proposal-object-rest-spread package has been renamed to @babel/plugin-transform-object-rest-spread by the babel project.
You could try deleting package-lock.json and running npm update to fix this.

1 Like