When I try to bulid my app with Angular13, I encountered a lot of mistakes:
./node_modules/Minio/dist/main/extensions.js:8:37-54 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
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/Minio/dist/main/helpers.js:47:37-54 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
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/Minio/dist/main/helpers.js:86:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
./node_modules/Minio/dist/main/helpers.js:88:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
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: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
It seems Webpack5 not include polyfills so minio can't find the module it need, I have no idea how to fix the problem
When I try to bulid my app with Angular13, I encountered a lot of mistakes:
./node_modules/Minio/dist/main/extensions.js:8:37-54 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
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/Minio/dist/main/helpers.js:47:37-54 - Error: Module not found: Error: Can't resolve 'stream' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
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/Minio/dist/main/helpers.js:86:11-24 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
./node_modules/Minio/dist/main/helpers.js:88:13-28 - Error: Module not found: Error: Can't resolve 'path' in 'C:\Users\SGH\AngularCode\OceanLims\node_modules\Minio\dist\main'
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: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
It seems Webpack5 not include polyfills so minio can't find the module it need, I have no idea how to fix the problem