TypeError: Cannot read property 'eagerRoutes' of undefined
See original GitHub issueCan´t read property ‘eagerRoutes’ of undefined
My extend.webpack.config.js is like below:
const { GuessPlugin } = require('guess-webpack');
const { parseRoutes } = require('guess-parser');
module.exports = {
plugins: [
new GuessPlugin({
GA: '<GAV Id>',
runtime: {
delegate: false
},
routeProvider() {
return parseRoutes('.');
}
})
]
};
But I get this error when I run the ng build --prod
command.
(node:1672) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'eagerRoutes' of undefined
at collectRoutingModules (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-parser\dist\guess-parser\index.js:465:17)
at processLazyRoute (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-parser\dist\guess-parser\index.js:463:9)
at Array.forEach (<anonymous>)
at collectRoutingModules (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-parser\dist\guess-parser\index.js:466:28)
at Object.exports.parseRoutes (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-parser\dist\guess-parser\index.js:598:9)
at exports.parseRoutes (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-parser\dist\guess-parser\index.js:843:28)
at Object.routeProvider (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\extend.webpack.config.js:16:16)
at extractRoutes (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-webpack\dist\guess-webpack\main.js:457:39)
at GuessPlugin._execute (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-webpack\dist\guess-webpack\main.js:490:9)
at C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\guess-webpack\dist\guess-webpack\main.js:486:54
at _next0 (eval at create (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:13:1)
at eval (eval at create (C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:28:1)
at C:\Users\aleja\OneDrive\Documents\Cursos\Angular\platzi-store\node_modules\copy-webpack-plugin\dist\index.js:91:9
(node:1672) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1672) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
router.use TypeError: Cannot read property 'use' of undefined
I used npm install -g express-generator@3 command yesterday, so it make my global setting to express version 3. I uninstall and install express ......
Read more >Routing error in dev mode: TypeError: Cannot read property ...
Unhandled Runtime Error TypeError: Cannot read property 'includes' of undefined Call Stack Router._resolveHref webpack-internal:///.
Read more >ERROR TypeError: Cannot read property title of undefined
HEY, SET YOUR LIKE THERE ! ... Your browser can't play this video. ... Solved: ERROR TypeError : Cannot read property title of...
Read more >ANGULAR 13 TypeError Cannot read property of undefined
In this tutorial, we will see a most common error faced by the Angular developers named as " TypeError Cannot read property of...
Read more >Cannot read properties of undefined' - JavaScript Debugging
How To Fix 'Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging.
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
Unfortunately, there’s nothing I can do at this point. You can generate JWT tokens and provide them to Guess.js in a similar way I did here.
Not sure what the text says. Would you translate?