Open dkillen opened 2 years ago
Without looking at your logs (I know nothing of webpack), I just remember when I was starting with Drizzle (and React!) that trying to use webpack was a big mistake, and moving to next.js was my solution.
Same issue here
I do have the same issue with node v16.14.0 npm 8.5.3
Have the same issue
It's because of Webpack 5 doesn't inculed polyfills anymore, I've solved the issue by installing a webpack plugin named node-polyfill-webpack-plugin
and adding it to mt webpack configuration file. After that all of my problems were solved.
npm i node-polyfill-webpack-plugin
// vue.config.js
const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: {
plugins: [new NodePolyfillPlugin()]
}
})
The errors set out below were encountered when following the Getting Started with Drizzle and React guide. The errors are first encountered when a Drizzle store is installed and configured in the react app. Prior to that, the simple react app that is generated with create-react-app will run without error.
As the error messages state, a breaking change was introduced in Webpack version 5. Drizzle itself does not use Webpack. The source of the errors appears to be the react-scripts package which is installed by create-react-app. There is a workaround, but it requires a user to dive down into the node_modules and modify the Webpack configuration in the react-scripts package to use fallbacks for the identified node polyfills
(node_modules/react-scripts/config/webpack.config.js)
. The user will also need to install additional packages for the fallbacks. Using an earlier version of create-react-app does not produce a more favourable result. This issue appears to arise from one or more of Drizzle's dependencies or sub-dependencies. They most likely need to be updated.Node: v14.18.2 npm: v6.14.15