Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Randy_91's avatar

Nova component not showing, mix 6 with vue 3 on Nova v3

Hi, I have a Nova v3 dashboard installed with Vue version 3. I am trying to create a custom component, I can get the menu entry to show but when I click on it there is only a blank page. I know this is something to do with using import instead of require but I can't get it to work.

My nova-components/Advertbuilder/webpack.mix.js looks like this:

let mix = require('laravel-mix') mix .setPublicPath('dist') .js('resources/js/tool.js', 'js') .vue({ version: 3 }) .sass('resources/sass/tool.scss', 'css') .webpackConfig({ externals: { Vue: 'vue', }, })

and my nova-components/Advertbuilder/resources/js/tool.js

Nova.booting((Vue, router, store) => { router.addRoutes([ { name: 'advertbuilder', path: '/advertbuilder', component: require('./components/Tool').default, }, ]) })

No errors when i compile are shown.

Any help?

0 likes
2 replies
Randy_91's avatar

I think its because nova 3 is not compatible with vue 3. So not sure how to actually go about getting the custom tools to work in this situation.

Randy_91's avatar

so I just created a test tool php artisan nova:tool peoplebank/tooltest Would you like to install the tool's NPM dependencies? Yes, this worked Would you like to compile the tool's assets? yes

ERROR in ./resources/js/components/Tool.vue?vue&type=template&id=68ff5483 (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Tool.vue?vue&type=template&id=68ff5483) 1:0-258 Module not found: Error: Can't resolve 'vue' in '/home/vagrant/laravel_projects/peoplebank_2.0/nova-components/Tooltest/resources/js/components'

Please or to participate in this conversation.