I can't build the App with imported module

206 Views Asked by At

I want to use jsforce module in my angular app. I installed jsforce with npm i jsforce and also installed @types/jsforce

import it like this import * as jsforce from "jsforce";

but when I'm trying build the Angular app recieves such errors

I don't know what to do I don't have polyfills.ts file as well

Warning: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\sax\lib'

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }



./node_modules/csv-parse/lib/es5/index.js:255:15-32 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\csv-parse\lib\es5'    

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }

./node_modules/csv-stringify/lib/index.js:3:9-26 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\csv-stringify\lib'       

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }

./node_modules/csv-stringify/lib/index.js:4:7-22 - Error: Module not found: Error: Can't resolve 'util' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\csv-stringify\lib'

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
        - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "util": false }

./node_modules/jsforce/lib/_required.js:6:10-25 - Error: Module not found: Error: Can't resolve 'util' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\jsforce\lib'

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
        - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "util": false }

./node_modules/jsforce/lib/browser/client.js:10:7-29 - Error: Module not found: Error: Can't resolve 'querystring' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\jsforce\lib\browser'

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "querystring": require.resolve("querystring-es3") }'
        - install 'querystring-es3'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "querystring": false }

./node_modules/jsforce/lib/oauth2.js:8:18-40 - Error: Module not found: Error: Can't resolve 'querystring' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\jsforce\lib'

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "querystring": require.resolve("querystring-es3") }'
        - install 'querystring-es3'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "querystring": false }

./node_modules/xml2js/lib/parser.js:35:17-47 - Error: Module not found: Error: Can't resolve 'timers' in 'C:\Users\ColderHost\Documents\GitHub\Salesforce-Unlimited-Extention\node_modules\xml2js\lib'

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.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
        - install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "timers": false }

i would like to receive help from anyone to resolve my problem

0

There are 0 best solutions below