-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
vue create default template that will not build #4572
Comments
Other workarounds in module.exports = {
css: {
sourceMap: true
}
} module.exports = {
productionSourceMap: false
} |
Getting the same issue, and the work around works. |
Version 4.40.0 has problem with production mode. Related vuejs/vue-cli#4572
Fixed in webpack v4.40.1 |
Update webpack to v4.40.1, still got the same issue. |
So, as this comment said, there may still be a potential bug in webpack webpack/webpack#9696 (comment) (I did not encounter that bug on my machine, though) |
I get this problem also using webpack v4.40.1. Downgrading to v4.39 fixes it. |
@sodatea or @bulletmark Could you give the newbie (me) to Vuejs a quick tutorial on how to pin the webpack version? |
Add this field to
If using yarn, just run
|
@ihelmer07 I am a newbie also. I merely did:
|
Reopening pending more news from webpack |
should be fixed with webpack v4.40.2 It's a little bit weird that these errors happen, because normally a ChunkGroup should not reference a not-existing asset. Maybe there is some other plugin which deletes an asset ( |
Can confirm, |
webpack->4.40.2 didn't fix it for me. But maybe this is due to the presence of several webpack in my monorepository. And I don’t understand what’s the matter because a day ago everything worked.
and now Akryum |
why does this work ? omg I don't understand |
Version
3.11.0
Reproduction link
https://gist.github.com/cameroncf/09c88edf99a7ed74a2a693d8816ee964
Environment info
Steps to reproduce
vue create x && cd x && yarn build
What is expected?
Successful build of minimal demo template created by Vue CLI.
What is actually happening?
Build fails with error:
vue-cli-service build
ERROR TypeError: Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
at /path/to/code/x/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:43:25
at Array.reduce ()
at getEntrypointSize (/path/to/code/x/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:40:27)
at /path/to/code/x/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:75:18
at _next0 (eval at create (/path/to/code/x/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at eval (eval at create (/path/to/code/x/node_modules/tapable/lib/HookCodeFactory.js:33:10), :24:1)
at callback (/path/to/code/x/node_modules/copy-webpack-plugin/dist/index.js:126:17)
at afterEmit (/path/to/code/x/node_modules/copy-webpack-plugin/dist/index.js:220:13)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/path/to/code/x/node_modules/tapable/lib/HookCodeFactory.js:33:10), :20:1)
at AsyncSeriesHook.lazyCompileHook (/path/to/code/x/node_modules/tapable/lib/Hook.js:154:20)
at /path/to/code/x/node_modules/webpack/lib/Compiler.js:482:27
at /path/to/code/x/node_modules/neo-async/async.js:2818:7
at done (/path/to/code/x/node_modules/neo-async/async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/path/to/code/x/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at /path/to/code/x/node_modules/webpack/lib/Compiler.js:464:33
at /path/to/code/x/node_modules/graceful-fs/graceful-fs.js:57:14
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This appears to be due to a missing sourcemaps for css files. The js sourcemaps are build and exist, but when the webpack SizeLimitsPlugin runs, it expects the css file to have a sourcemap too, which is does not.
I was able to resolve this by adding a vue.config.js file to the project (there wasn't one) containing the following:
I am not sure I completely understand why some sourcemaps got generated and others did not. Perhaps vue.config.js should be generated by the create template in this case?
Thanks for reading about my bug!
The text was updated successfully, but these errors were encountered: