Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: callback is not a function #6

Open
hukaibaihu opened this issue May 18, 2017 · 0 comments
Open

TypeError: callback is not a function #6

hukaibaihu opened this issue May 18, 2017 · 0 comments

Comments

@hukaibaihu
Copy link

package.json

    "require-error-handler-webpack-plugin": "^0.0.2",
    "webpack": "^2.2.1",
    "webpack-bundle-analyzer": "^2.2.1",
    "webpack-dev-middleware": "^1.10.0",
    "webpack-hot-middleware": "^2.16.1",
    "webpack-merge": "^2.6.1"

webpack.base.config.js

var requireErrorHandlerPlugin = require('require-error-handler-webpack-plugin')
var JsonpMainTemplatePlugin = require('webpack/lib/JsonpMainTemplatePlugin')


plugins: [
    new requireErrorHandlerPlugin.JsonpErrorHandlerPlugin(JsonpMainTemplatePlugin),
    new requireErrorHandlerPlugin.RequireEnsureErrorHandlerPlugin(),
    new requireErrorHandlerPlugin.AMDRequireErrorHandlerPlugin()
]

console log

webpack: Using compiler.parser is deprecated.
Use compiler.plugin("compilation", function(compilation, data) {
  data.normalModuleFactory.plugin("parser", function(parser, options) { parser.apply(/* ... */); });
}); instead. It was called at AMDErrorHandlerPlugin.apply (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/require-error-handler-webpack-plugin/src/AMDRequireErrorHandlerPlugin.js:23:18).
> Starting dev server...
/Users/ste7en/Desktop/frontend/hrsaas/node_modules/loader-runner/lib/LoaderRunner.js:133
		if(isError) throw e;
		            ^

TypeError: callback is not a function
    at NullFactory.create (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/require-error-handler-webpack-plugin/node_modules/webpack/lib/NullFactory.js:9:9)
    at iteratorFactory (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:233:12)
    at /Users/ste7en/Desktop/frontend/hrsaas/node_modules/async/dist/async.js:3060:16
    at eachOfArrayLike (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/async/dist/async.js:1003:9)
    at eachOf (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/async/dist/async.js:1051:5)
    at Object.eachLimit (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/async/dist/async.js:3122:5)
    at Compilation.addModuleDependencies (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:214:12)
    at Compilation.processModuleDependencies (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:199:8)
    at _this.buildModule.err (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:340:13)
    at building.forEach.cb (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:144:27)
    at Array.forEach (native)
    at callback (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:144:13)
    at module.build (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/Compilation.js:171:11)
    at doBuild (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/NormalModule.js:300:11)
    at runLoaders (/Users/ste7en/Desktop/frontend/hrsaas/node_modules/webpack/lib/NormalModule.js:206:11)
    at /Users/ste7en/Desktop/frontend/hrsaas/node_modules/loader-runner/lib/LoaderRunner.js:370:3
error Command failed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant