问题描述 投票:0回答:0
eRror:

Failed to compile. Module not found: Error: Can't resolve 'buffer' in '/home/canakil/Code/cemil-mern/frontend/node_modules/safe-buffer' 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: { "buffer": require.resolve("buffer/") }' - install 'buffer' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "buffer": false } WARNING in ./node_modules/sax/lib/sax.js 139:13-37 Module not found: Error: Can't resolve 'stream' in '/home/canakil/Code/cemil-mern/frontend/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 } WARNING in [eslint] src/pages/Create.js Line 6:10: 'populateExcelForMonthly' is defined but never used no-unused-vars ERROR in ./node_modules/safe-buffer/index.js 3:13-30 Module not found: Error: Can't resolve 'buffer' in '/home/canakil/Code/cemil-mern/frontend/node_modules/safe-buffer' 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: { "buffer": require.resolve("buffer/") }' - install 'buffer' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "buffer": false } ERROR in ./node_modules/xlsx-populate/lib/Encryptor.js 12:15-32 Module not found: Error: Can't resolve 'crypto' in '/home/canakil/Code/cemil-mern/frontend/node_modules/xlsx-populate/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: { "crypto": require.resolve("crypto-browserify") }' - install 'crypto-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "crypto": false } ERROR in ./node_modules/xlsx-populate/lib/Workbook.js 4:11-24 Module not found: Error: Can't resolve 'fs' in '/home/canakil/Code/cemil-mern/frontend/node_modules/xlsx-populate/lib' webpack compiled with 3 errors and 2 warnings

我会感谢我为什么遇到此错误以及含义的任何方向。
	

这通常发生在WebPack 4.x中。 您正在使用什么版本? 升级到5可能会有所帮助。


javascript reactjs
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.