"'Symbol()' not found injection error in Vuejs"
P粉759457420
2023-08-24 22:37:33
<p>I am using confirmdialog in primevue and encountered the following error: </p>
<blockquote>
<p>[Vue Warning]: Injection "Symbol()" not found</p>
</blockquote>
<p>I have no idea what this error means or how to fix it. Can anyone please help me?
Here is my source code: </p>
<pre class="brush:php;toolbar:false;">const deleteCategory = () => {
confirm.require({
message: 'Are you sure you want to continue? ',
header: 'confirm',
icon: 'pi pi-exclamation-triangle',
accept: () => {
notification.showMessage("Success!");
},
reject: () => {
router.push({ name: "CategoriesPage" });
}
});
}</pre>
<p><br /></p>
Error
[Vue warn]: injection "Symbol()" not found
Has nothing to do with the code you provided. When usinginject: ['injectedVar']
in a nested component, if it is not provided from the parent component,[Vue warn]: injection ... not found
will appear.So you should check what you are trying to inject and where it needs to be served from. For more information, see the documentation: Provide/Inject