DEV Community

Discussion on: Webpack 5 : Guide for beginners

Collapse
 
samurai71 profile image
Mark Landeryou

I am getting errors and I am trying to figure this out

Collapse
 
anitaparmar26 profile image
anitaparmar26

What error are you facing?

Collapse
 
samurai71 profile image
Mark Landeryou

Here is my code on github
github.com/samurai71/webpack-setup...

Here is the error codes

Executing task: npm run build <

webpack-setup@1.0.0 build
webpack

[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.

Thread Thread
 
anitaparmar26 profile image
anitaparmar26

It's just syntax error once you check our github repo. Webpack 5

Thread Thread
 
samurai71 profile image
Mark Landeryou

Thank you for your help I greatly appreciate it