dalamgir/angular-next-starter-kit

Bundle not found error

Closed this issue · 7 comments

When running npm run serve, everything is compiled but in the browser there is this error:

GET http://localhost:8080/bundle.js 404 (Not Found)

Also automatic opening the page in the browser would be sweet (that is commonly done with serve), it is very easy with Gulp but I've no clue about Webpack.

diit commented

Having same issue, would love to get this working.

After npm run serve, try navigating to http://localhost:8080/build/index.html

diit commented

@Alamgird Getting issue with JQuery not being defined.

image

Thanks!

Maybe adding something like open <url> to make it run automatically?

Hey guys, I had this same issue when running the module out of the box. Webpack wasn't looking for the build file in the right location.

Fixed the issue by changing the following in webpack.config.js:

output: {
        filename: 'build/bundle.js'
    },

To:

output: {
        path: __dirname + '/build',
        filename: 'bundle.js'
    },

Fixed!