Webpack 5: configuration.node has an unknown property 'dgram'. These properties are valid:
See original GitHub issueI receive an error message:
Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'dgram'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
because of this setting:
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
What is the equavilent in Webpack 5?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Webpack Error - configuration.node has an unknown property 'fs'
I managed to get this to work with some help from the Webpack team. Using the following webpack configuration as recommended by the...
Read more >Node - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Getting Webpack invalidation error when trying to start dev ...
Options object for node compatibility features. * configuration.node has an unknown property 'dgram'. These properties are valid:.
Read more >options has an unknown property 'inline'. these ... - You.com
Details: * configuration.node has an unknown property 'dgram'. These properties are valid: object { __dirname?, __filename?
Read more >Ruby on Jets Webpacker errors and Invalid Configuration Object
node has an unknown property 'dgram'. These properties are valid: object { __dirname?, __filename?, global? } -> Options object for node ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Inside
config/webpack/*.jsyou should have some configs for your env (as described here: https://github.com/rails/webpacker#webpack-configuration). You need to remove those, so for example, i have inbase.js:it solved this issue for me
To anyone who also has the same problem: We’re using rails webpacker and had the described issue. Rails’
webpacker5.x.x is only compatible withwebpack4.x.x (https://github.com/rails/webpacker/tree/5-x-stable). You might want to downgrade towebpack4 😃