question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'entryOption' of undefined

See original GitHub issue

webpack file

  const SVGSpritemapPlugin = require('svg-spritemap-webpack-plugin');

  ...

  plugins: [
    new ExtractTextPlugin('styles.css'),
    new CopyWebpackPlugin([
      {
        from: path.resolve(__dirname, 'resources/img'),
        to: path.resolve(__dirname, 'public/dist/images')
      }
    ]),
    new SVGSpritemapPlugin({
    //   src: path.resolve(__dirname, 'resources/icons'),
    //   filename: 'sprites.svg'
    })
  ]

This is the firts time I use webpack. Added the const at the top and updated the plugin array. After that trying to run webpack, but I end up with a error below. Added various configurations, same result. I get the following error. Using webpack 3.11.0.

node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development webpack /var/www/…/node_modules/webpack/bin/webpack.js:348 throw err; ^ TypeError: Cannot read property ‘entryOption’ of undefined

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

16reactions
achabahecommented, Jul 23, 2019

change the version of webpack-dev-server to “3.0.0” and not “^3.0.0”;

You are welcome 😃

12reactions
NguyenHoangSon96commented, Jul 27, 2019

change the version of webpack-dev-server to “3.0.0” and not “^3.0.0”;

You are welcome 😃 This should be an excepted answer

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack - Cannot read property 'entryOption' of undefined
I'm using webpack 3.8.1 and webpack-dev-server 3.1.11. Cannot read property 'entryOption' of undefined. const sharedConfig = require('.
Read more >
Cannot read property 'entryOption' of undefined #3 - GitHub
Hi, I got this error when I try to launch the project "npm run start" Could you help me please ? Prompt error...
Read more >
Cannot read property 'entryOption' of undefined - CSDN博客
在运行React+webpack程序的时候出现Cannot read property 'entryOption' of undefined去网上找了很多也没找到具体原因,后来我把webpack-cli卸载就好 ...
Read more >
webpack/webpack - Gitter
But im getting Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__ Does anyone might know where to look for this?
Read more >
Compiler Hooks | webpack
entryOption. SyncBailHook ... Called after setting up initial set of internal plugins. ... Hook into the compiler before it begins reading records ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found