mzgoddard / hard-source-webpack-plugin

https://www.npmjs.com/package/hard-source-webpack-plugin
ISC License
2.7k stars 160 forks source link

Throw error on file change #421

Open captain-yossarian opened 6 years ago

captain-yossarian commented 6 years ago

Expected Behavior

Hot reload

Actual Behavior

When I make second build with webpack-dev-server, plugin works fine, but when I make changes in files, plugin throws error:

Is an error being thrown?

TypeError: Cannot read property 'call' of undefined at Object.exports.call (C:\xampp\htdocs\cic\public\node_modules\hard-source-webpack-plugin\lib\util\plugin-compat.js:171:17) at Proxy.run (C:\xampp\htdocs\cic\public\node_modules\hard-source-webpack-plugin\lib\SystemArchetype.js:184:20) at args (C:\xampp\htdocs\cic\public\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:52:19) at _fn1.then._result1 (eval at create (C:\xampp\htdocs\cic\public\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:17:1) at <anonymous>

Steps to Reproduce

  • Steps to create a minimal reproduction or a link to a repository containing the same
  • Any other information you find helpful reproducing an issue

Operating System, Node, and NPM dependency versions

Windows 10 Node v 9.3.0

{
  "private": true,
  "scripts": {
    "remove": "node packages/files.js remove",
    "copy": "node packages/files.js copy",
    "dll": "webpack --config webpack.vendor.config.js",
    "start:dev": "webpack-dev-server --hot --mode development --open",
    "build": "webpack --mode production",
    "gulp": "gulp default"
  },
  "devDependencies": {
    "@babel/register": "^7.0.0-beta.55",
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.5",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-register": "^6.26.0",
    "browser-sync": "^2.24.6",
    "cache-loader": "^1.2.2",
    "copy-webpack-plugin": "^4.5.2",
    "css-loader": "^1.0.0",
    "expose-loader": "^0.7.5",
    "file-loader": "^1.1.11",
    "gulp": "^3.9.1",
    "gulp-babel": "^7.0.1",
    "gulp-clean": "^0.4.0",
    "gulp-concat": "^2.6.1",
    "gulp-minify": "^3.1.0",
    "gulp-sequence": "^1.0.0",
    "gulp-uglify": "^3.0.1",
    "gulp-watch": "^5.0.1",
    "happypack": "^5.0.0",
    "hard-source-webpack-plugin": "^0.12.0",
    "html-loader": "^0.5.5",
    "jquery-ui": "^1.12.1",
    "laravel-mix": "^2.1.11",
    "mini-css-extract-plugin": "^0.4.1",
    "parallel-webpack": "^2.3.0",
    "thread-loader": "^1.2.0",
    "webpack-bundle-analyzer": "^2.13.1",
    "webpack-cli": "^3.1.0",
    "webpack-command": "^0.4.1",
    "webpack-dev-server": "^3.1.5"
  },
  "dependencies": {
    "angular": "^1.5.8",
    "angular-cookies": "^1.5.8",
    "angular-route": "^1.5.8",
    "angular-sanitize": "^1.5.8",
    "angular-touch": "^1.5.8",
    "angular-ui-bootstrap": "^2.5.6",
    "angular-ui-notification": "^0.3.6",
    "angular-ui-router": "^0.2.14",
    "angular-websocket": "^2.0.1",
    "autodll-webpack-plugin-webpack-4": "^1.0.0",
    "babel-polyfill": "^6.26.0",
    "bootstrap": "^3.3.7",
    "bootstrap-select": "^1.13.1",
    "bufferutil": "^4.0.0",
    "exports-loader": "^0.7.0",
    "generator-gulp-webapp": "^1.1.1",
    "gulp-cli": "^2.0.1",
    "html-webpack-plugin": "^3.2.0",
    "imports-loader": "^0.8.0",
    "jquery": "^3.3.1",
    "locale": "^0.1.0",
    "moment": "^2.20.1",
    "npm": "^5.7.1",
    "oclazyload": "^1.1.0",
    "pump": "^3.0.0",
    "rangy": "^1.3.0",
    "request": "^2.83.0",
    "require": "^2.4.20",
    "requirejs": "^2.3.5",
    "rimraf": "^2.6.2",
    "speed-measure-webpack-plugin": "^1.2.2",
    "streamqueue": "^1.1.2",
    "style-loader": "^0.21.0",
    "textangular": "^1.5.16",
    "tls": "0.0.1",
    "ui-select": "^0.19.8",
    "url-loader": "^1.0.1",
    "utf-8-validate": "^5.0.1",
    "webpack": "^4.16.5",
    "webpack-concat-plugin": "^3.0.0",
    "worker-loader": "^2.0.0",
    "ws": "^1.1.5"
  }
}
alexturpin commented 6 years ago

Are you using the Speed Measure Plugin by any chance? This is what was happening to me. https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/46

captain-yossarian commented 5 years ago

@alexturpin sorry for delay and thank you for your answer, I will check it tomorrow