[webpack-cli] Failed to load '/Users/marklanderyou/Desktop/webpack-setup/webpack.config.js' config
[webpack-cli] /Users/marklanderyou/Desktop/webpack-setup/webpack.config.js:25
{
^
SyntaxError: Unexpected token '{'
at new Script (vm.js:102:7)
at NativeCompileCache._moduleCompile (/Users/marklanderyou/Desktop/webpack-setup/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/Users/marklanderyou/Desktop/webpack-setup/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (/Users/marklanderyou/Desktop/webpack-setup/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at WebpackCLI.tryRequireThenImport (/Users/marklanderyou/Desktop/webpack-setup/node_modules/webpack-cli/lib/webpack-cli.js:245:16)
at loadConfigByPath (/Users/marklanderyou/Desktop/webpack-setup/node_modules/webpack-cli/lib/webpack-cli.js:1725:30)
The terminal process "bash '-c', 'npm run build'" terminated with exit code: 2.
Terminal will be reused by tasks, press any key to close it.
Here is my code on github
github.com/samurai71/webpack-setup...
Here is the error codes
[webpack-cli] Failed to load '/Users/marklanderyou/Desktop/webpack-setup/webpack.config.js' config
[webpack-cli] /Users/marklanderyou/Desktop/webpack-setup/webpack.config.js:25
{
^
SyntaxError: Unexpected token '{'
at new Script (vm.js:102:7)
at NativeCompileCache._moduleCompile (/Users/marklanderyou/Desktop/webpack-setup/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/Users/marklanderyou/Desktop/webpack-setup/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (/Users/marklanderyou/Desktop/webpack-setup/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at WebpackCLI.tryRequireThenImport (/Users/marklanderyou/Desktop/webpack-setup/node_modules/webpack-cli/lib/webpack-cli.js:245:16)
at loadConfigByPath (/Users/marklanderyou/Desktop/webpack-setup/node_modules/webpack-cli/lib/webpack-cli.js:1725:30)
The terminal process "bash '-c', 'npm run build'" terminated with exit code: 2.
Terminal will be reused by tasks, press any key to close it.
It's just syntax error once you check our github repo. Webpack 5
Thank you for your help I greatly appreciate it