Open roopakpv opened 7 years ago
Have you tried using fs
without edge in your project? Does it resolve correctly?
i am not using fs module in my project. But edge is using it internally.
Like agracio suggested i removed edge and tried using fs and i am getting the same error.
Just a guess, but is it a web project you running in browser? Or perhaps you are using webpack/browserify?
i am having a nodejs project in which we are using webpack
If the project is not for web/browser add
target:'node'
to your webpack config. You will be able to access full nodejs stack.
Ours is a web project. i tried adding target:'node' and the console is again showing the fs error
You will not be able to use edge in a web project, same as you cannot access most of clients PC resources in a browser.
i am using latest edgejs(6.5.1) in my node project. but when i use edge in my project,
var edge = require('edge');
i am getting this error "cannot resolve module 'fs' " later when i checked the edge.js file i see that edge is using 'fs'
var fs = require('fs') , path = require('path') , builtEdge = path.resolve(dirname, '../build/Release/' + (process.env.EDGE_USE_CORECLR || !fs.existsSync(path.resolve(dirname, '../build/Release/edge_nativeclr.node')) ? 'edge_coreclr.node' : 'edge_nativeclr.node')) , edge;
How can i fix this error?