As for the context of why I'm trying to use vue-cryptojs is to receive an encrypted data from URL params, then display the data decrypted on the page. First, I ran npm install vue-cryptojs command how was it oriented by your README document and rightly after I imported and added the plugin to the Vue instance, as the following:
main.js file:
// Code revised in order to maintain objectivity
import { createApp } from 'vue';
import CryptoJS from 'vue-cryptojs'
import App from './App.vue';
const app = createApp(App);
app.use(CryptoJS);
app.mount('#app');
This is the error when I run my app, without any further changes:
ImageText Log
```
vue-cryptojs.min.js?b73b:1 Uncaught TypeError: Object.defineProperties called on non-object
at Function.defineProperties ()
at Object.install (webpack-internal:///./node_modules/vue-cryptojs/dist/vue-cryptojs.min.js:1)
at Object.use (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:3244)
at eval (webpack-internal:///./src/main.js:43)
at Module../src/main.js (app.js:1371)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at Object.1 (app.js:1468)
at __webpack_require__ (app.js:854)
at checkDeferredModules (app.js:46)
```
Maybe that's subject for another issue, but also I'm unsure about how I'd use it on my SFC components since we are using Vue 3's Composition API (I don't know if that makes any difference) and also the introduced syntax sugar . Found references on usage of your solutions often access the CryptoJS instance through this reference, which (as far as I'm concerned) works differently in the scope I just mentioned.
Observation
I'm very new to Vue and I don't have much experience with web development in general, even less on front-end development. If any info is missing or something feels ambiguous, let me know and I'll elaborate better.
As for the context of why I'm trying to use
vue-cryptojs
is to receive an encrypted data from URL params, then display the data decrypted on the page. First, I rannpm install vue-cryptojs
command how was it oriented by your README document and rightly after I imported and added the plugin to the Vue instance, as the following:main.js
file:This is the error when I run my app, without any further changes:
Image
Text Log
``` vue-cryptojs.min.js?b73b:1 Uncaught TypeError: Object.defineProperties called on non-object at Function.defineProperties (Maybe that's subject for another issue, but also I'm unsure about how I'd use it on my SFC components since we are using Vue 3's Composition API (I don't know if that makes any difference) and also the introduced syntax sugar . Found references on usage of your solutions often access the CryptoJS instance through
this
reference, which (as far as I'm concerned) works differently in the scope I just mentioned.Observation
I'm very new to Vue and I don't have much experience with web development in general, even less on front-end development. If any info is missing or something feels ambiguous, let me know and I'll elaborate better.