universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

ssr:build error with modern mode #24

Closed xurwxj closed 5 years ago

xurwxj commented 5 years ago

got following error when building:

yarn run ssr:build --modern
yarn run v1.12.3
$ vue-cli-service ssr:build --modern
[4:51:33 PM] Building legacy bundle...
(node:38969) UnhandledPromiseRejectionWarning: TypeError: items is not iterable
    at chainConfig.plugin.tap.args (/xxx/node_modules/@uvue/vue-cli-plugin-ssr/webpack/ssr.js:54:24)
    at Object.tap (/xxx/node_modules/webpack-chain/src/Plugin.js:24:24)
    at module.exports (/xxx/node_modules/@uvue/vue-cli-plugin-ssr/webpack/ssr.js:52:30)
    at Promise (/xxx/node_modules/@uvue/vue-cli-plugin-ssr/commands/build.js:59:26)
    at new Promise (<anonymous>)
    at build (/xxx/node_modules/@uvue/vue-cli-plugin-ssr/commands/build.js:51:10)
    at /xxx/node_modules/@uvue/vue-cli-plugin-ssr/commands/build.js:37:15
(node:38969) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:38969) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 2.31s.

server.config.js:

import { ExpressAdapter } from '@uvue/server';

export default {
  adapter: ExpressAdapter,
  plugins: [
    ['@uvue/server/plugins/gzip',{
      filter: null,
      level: -1
    },],
    '@uvue/server/plugins/serverError',
    // '@uvue/server/plugins/static',
    '@uvue/server/plugins/modernBuild',
    [
      '@uvue/server/plugins/cookie',
      {
        secret: 'xxxxxx'
      }
    ],
    './proxy',
    './pubEnv'
  ]
}
yabab-dev commented 5 years ago

Yeah sorry, modern mode fails actually.

It will be fixed in next release (this week)

xurwxj commented 5 years ago

@chymz tks for your reply.

yabab-dev commented 5 years ago

Fixed in 0.1.0-alpha.17