You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Importing Jsforce Library causing an error. Uncaught ReferenceError: process is not defined at Object../node_modules/readable-stream/lib/_stream_writable.js #1222
I am facing an issue Uncaught ReferenceError: process is not defined at Object../node_modules/readable-stream/lib/_stream_writable.js when I am importing jsforce in component. I have attached the Screenshot below
without import jsforce from 'jsforce' in code the web page was loading but when I added import jsforce from 'jsforce' jsforce library it started throwing this error in browser console and Web page was not loading the content. Kindly help me resolve this issue if anybody is aware of it's reason.
I think this issue started occurring with webpack 5. I was able to use JSForce successfully in my previous project but now its not working with the same issue.
This is the part of error I am getting:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
and suggestion mentioned in below stackoverflow post was not helpful.
Activity
ravnarayananpaypal commentedon Jul 28, 2022
Are you using webpack ?
jaigupta10 commentedon Aug 17, 2022
I think this issue started occurring with webpack 5. I was able to use JSForce successfully in my previous project but now its not working with the same issue.
This is the part of error I am getting:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
and suggestion mentioned in below stackoverflow post was not helpful.
https://stackoverflow.com/questions/65894521/webpack-5-node-polyfill-instructions-dont-work
Any help would be appreciated.
cristiand391 commentedon Nov 7, 2023
@FeiPengDev can you try setting these polyfills in your webpack config?:
jsforce/webpack.config.js
Lines 5 to 11 in 7c8e6a1
NOTE: those packages should be devDeps in your project.
that webpack config is from the
2.0branch where we bumped webpack to v5.