I am trying to get the device information from the application which is being built using Vue. We are using device-uuid.js library to capture the information The installation is done by executing below command
npm install device-uuid --save
and I can see device-uuid is listed in node modules.
Below is the Vue code.
<template>
<div class="container">
<div class="screen">
</div>
</div>
</template>
<script>
import axios from "axios";
import DeviceUUID from "device-uuid";
export default {
name: "ph",
components: {
NB,
},
props: ["text15", "no", "place", "next"],
data:()=>({
key1 ='',
key2 = ''
}),
created() {
this.loadPage();
this.retrieveFormValues();
this.listenToRouter();
this.getDeviceType();
},
methods: {
getDeviceType:function(){
var du = new DeviceUUID.parse();
var dua = [
du.language,
du.platform,
du.os,
du.cpuCores,
du.isAuthoritative,
du.silkAccelerated,
du.isKindleFire,
du.isDesktop,
du.isMobile,
du.isTablet,
du.isWindows,
du.isLinux,
du.isLinux64,
du.isMac,
du.isiPad,
du.isiPhone,
du.isiPod,
du.isSmartTV,
du.pixelDepth,
du.isTouchScreen
];
console.log('dua',dua )
}
};
</script>
This is resulting in below error
ReferenceError: DeviceUUID is not defined
getDeviceType PH.vue:115
created PH.vue:110
VueJS 32
<anonymous> main.js:47
js app.js:5514
__webpack_require__ app.js:854
fn app.js:151
1 app.js:5562
__webpack_require__ app.js:854
checkDeferredModules app.js:46
<anonymous> app.js:994
<anonymous> app.js:997
What is that I am missing during import