Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to add a new dependency to Vue 3 project

I installed a new package "vue-full-loading" to my project. It gives me an error if I reference the package

import loading from "vue-full-loading";

and build using vite. Any idea on what this error means ? Thank you!

Unexpected token.

if (isReadonly(target)) {
process.env.NODE_ENV !== 'production' && warn("Set operation on key \"".concat(key, "\" 
failed: target is readonly."));
                           ^
return;
}

Below are the dependencies I have.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

"dependencies": {
"axios": "^1.1.3",
"bootstrap": "^5.2.2",
"bootstrap-vue": "^2.22.0",
"pinia": "2.0.23",
"vue": "3.2.41",
"vue-router": "4.1.5",
"vue-full-loading": "^1.2.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "3.1.2",
"vite": "3.1.8"
}

>Solution :

vue-full-loader was last updated 5 years ago according to npm – it’s highly unlikely it would be compatible with the latest version of Vue, which is what you’re running. The package will likely have to be updated to use with Vue 3. If you have the option you may want to try it with an earlier version of Vue, but I would recommend looking for an alternative.

Here is a similar package that has been updated in the last month or so:
https://www.npmjs.com/package/vue-loading-overlay

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading