H
hmn99
Guest
hmn99 Asks: Vue js Module not found: Error: Can't resolve 'fs' and Can't resolve 'child_process'
This problem has bothered me a lot and I haven't found a solution yet I installed vue-webartc for video calls and want to use it in my vue app but this problem appeared I tried with the solutions on the internet but to no avail How do I put fs and child process to flase into a vue js project? i get these problem in this image of the screenshot problem messages i added this to my package.json file but still have the same problem
and i also tried this in my webpack.config.js
};
should i modify this vue.config.js also?
i will really appreciate your help
This problem has bothered me a lot and I haven't found a solution yet I installed vue-webartc for video calls and want to use it in my vue app but this problem appeared I tried with the solutions on the internet but to no avail How do I put fs and child process to flase into a vue js project? i get these problem in this image of the screenshot problem messages i added this to my package.json file but still have the same problem
Code:
"browser": {
"fs": false,
"child_process": false
}
and i also tried this in my webpack.config.js
Code:
export const node = {
child_process: "empty",
fs: "empty"
};
export const resolve = {
extensions: [".ts", ".js"],
fallback: {
"fs": false,
"child_process": false,
},
};
should i modify this vue.config.js also?
Code:
const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: {
plugins: [
new NodePolyfillPlugin(),
],
},
})
i will really appreciate your help
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.