`Undefined node "type"` error will occur when I use webpack in production mode
See original GitHub issueWhen I pack code in development mode, it will work properly. But if I use production mode, error like bellow will occur everytime.
Input is: ['a' => 1]
:
Uncaught Error: Undefined node "string"
at main.js:210
at n.read_scalar (main.js:174)
at n.read_expr_item (main.js:144)
at n.read_expr (main.js:144)
at n.read_array_pair_list (main.js:129)
at n.read_array (main.js:129)
at n.read_scalar (main.js:174)
at n.read_expr_item (main.js:144)
at n.read_expr (main.js:144)
at n.read_statement (main.js:179)
I’ve tried both 2.x & 3.x-alpha, same result got.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Webpack production mode - NODE_ENV undefined
Way I found is to use argv.mode variable inside export like so: module.exports = (env, argv) => { const isDevelopment = argv.mode !==...
Read more >Uncaught TypeError: Cannot read property 'call' of undefined
HMR provided by webpack crashes, with the error: "Uncaught TypeError: Cannot read property 'apply' of undefine" as shown in the following issue ...
Read more >Externals - webpack
The externals configuration option provides a way of excluding dependencies from the output bundles. Instead, the created bundle relies on that dependency ...
Read more >How I solved and debugged my Webpack issue through trial ...
You can actually do npm start , without the run command ? ... "scripts": { "build": "webpack --mode production", "dev": ...
Read more >Node.js v19.3.0 Documentation
Functions to convert from C types to Node-API ... removal may occur in any future release. Use of the feature is not recommended...
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 FreeTop 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
Top GitHub Comments
I used webpack with minimal config like bellow for a test, and got that error:
And when I used it in my project with a complicated config file, I got that error too.
However, it worked properly when I tested with your webpack config.
Hi @takashiki, the problem should be resolved by using version
3.0.0-prerelease.2