Skip to content

Compilation errors are hidden when using VueSSRServerPlugin #5553

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

Closed
amoe opened this issue Apr 28, 2017 · 0 comments
Closed

Compilation errors are hidden when using VueSSRServerPlugin #5553

amoe opened this issue Apr 28, 2017 · 0 comments

Comments

@amoe
Copy link

amoe commented Apr 28, 2017

Version

2.3.0

Reproduction link

https://github.com/amoe/vue-ssr-compile-error-demo

Steps to reproduce

  • npm install
  • npm run build

What is expected?

Something related to the real error that caused the compilation failure. In this case:

Entry module not found: Error: Can't resolve './nonexistent.js' in '/home/amoe/werk/vue-bug'
resolve './nonexistent.js' in '/home/amoe/werk/vue-bug'
  using description file: /home/amoe/werk/vue-bug/package.json (relative path: .)
  after using description file: /home/amoe/werk/vue-bug/package.json (relative path: .)
    using description file: /home/amoe/werk/vue-bug/package.json (relative path: ./nonexistent.js)
      as directory
        /home/amoe/werk/vue-bug/nonexistent.js doesn't exist
      no extension
        /home/amoe/werk/vue-bug/nonexistent.js doesn't exist
      .js
        /home/amoe/werk/vue-bug/nonexistent.js.js doesn't exist
      .json
        /home/amoe/werk/vue-bug/nonexistent.js.json doesn't exist

What is actually happening?

TypeError: Cannot read property 'assets' of undefined
    at Compiler.<anonymous> (/home/amoe/werk/vue-bug/node_modules/vue-server-renderer/server-plugin.js:50:51)
    at Compiler.applyPluginsAsyncSeries (/home/amoe/werk/vue-bug/node_modules/tapable/lib/Tapable.js:142:13)
    at Compiler.emitAssets (/home/amoe/werk/vue-bug/node_modules/webpack/lib/Compiler.js:303:7)
    at onCompiled (/home/amoe/werk/vue-bug/node_modules/webpack/lib/Compiler.js:242:11)

(rest of stack trace trimmed)


The problem is that the VueSSRServerPlugin hides any other errors that may exist with the webpack configuration. To clarify, it's not just a nonexistent entry file that this problem hides -- that wouldn't be as bad. It affects and hides other errors that may exist in the configuration, meaning you have to disable VueSSRServerPlugin to debug your Webpack configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant