sveltejs / template-webpack

Template for building basic Svelte applications with webpack
300 stars 118 forks source link

TypeError: Cannot read property 'properties' of undefined while building to production #10

Closed MNITD closed 5 years ago

MNITD commented 5 years ago

When I was trying to build project with npm run build, I got following error: image

Error is referring to webpack and webpack-cli, the issue says it becouse of some build updates and can be fixed by updating to latest version of webpack and webpack-cli

So after updating with npm i webpack@latest webpack-cli@latest -D project is now successfuly building

Could you please update this dependencies to latest versions?

YuriiNskyi commented 5 years ago

+1 to author, I would also suggest to update svelte-loader version, to prevent this bug.

JordanShurmer commented 5 years ago

PR #11 fixes this

JordanShurmer commented 5 years ago

You can fix it in your project locally if you want. Or use the branch that PR #11 is coming from as your degit source.

# Update all dependencies
npm install -g npm-check-updates
ncu -u

Also should replace the deprecated webpack-serve with webpack-dev-server

npm uninstall --save-dev webpack-serve
npm install --save-dev webpack-dev-server

Then update the scripts.dev script in webpack.json to simply be "webpack-dev-server"