I am creating vue-cli project and everything works file, but when i try to install new module it show me error after install :
This dependency was not found:
* fs in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/Index.vue, ./~/mp3-duration/index.js and 1 other
To install it, you can run: npm install --save fs
I tried multiple times to confirm but still an error, in the node_modules folder there is a library.
I am installing this module and using :
const musicdata = require('musicmetadata');
After add above code i am writing this :
getDuration(file) {
fs.createReadStream(file), (err, metadata) => {
if (err) throw err;
console.log(metadata)
}
}
But getting an error as I specified above, I want a single page website but want some node_modules to get some information, how do I include these modules?
Thanks