nuxt-community / express-template

Starter template for Nuxt 2 with Express.
https://codesandbox.io/s/github/nuxt-community/express-template
1.25k stars 239 forks source link

init project and run, get this error. "Unexpected token" on App (App.js) #139

Closed Jonham closed 5 years ago

Jonham commented 5 years ago
✖ error Error: Module parse failed: Unexpected token (93:4)
  You may need an appropriate loader to handle this file type.
  |
  |     },
  >     ...App
  |   };
  |   const next = ssrContext ? ssrContext.next : location => app.router.push(location); // Resolve route
  at Object../.nuxt/index.js (server-bundle.js:97:7)
  at __webpack_require__ (server-bundle.js:21:30)
  at Module../.nuxt/server.js (server-bundle.js:130:64)
  at __webpack_require__ (server-bundle.js:21:30)
  at Object.0 (server-bundle.js:392:18)
  at __webpack_require__ (server-bundle.js:21:30)
  at module.exports../.nuxt/index.js (server-bundle.js:85:18)
  at Object.<anonymous> (server-bundle.js:88:10)
  at evaluateModule (/Users/jonham/code/part/get-web-pc/node_modules/vue-server-renderer/build.js:8349:21)
  at /Users/jonham/code/part/get-web-pc/node_modules/vue-server-renderer/build.js:8407:18
  at new Promise (<anonymous>)
  at /Users/jonham/code/part/get-web-pc/node_modules/vue-server-renderer/build.js:8399:14
  at Object.renderToString (/Users/jonham/code/part/get-web-pc/node_modules/vue-server-renderer/build.js:8575:9)
  at Renderer.renderRoute (/Users/jonham/code/part/get-web-pc/node_modules/nuxt/dist/nuxt.js:2074:41)
  at Renderer.nuxtMiddleware (/Users/jonham/code/part/get-web-pc/node_modules/nuxt/dist/nuxt.js:1629:31)
  at call (/Users/jonham/code/part/get-web-pc/node_modules/connect/index.js:239:7)
  at next (/Users/jonham/code/part/get-web-pc/node_modules/connect/index.js:183:5)
  at next (/Users/jonham/code/part/get-web-pc/node_modules/connect/index.js:161:14)
  at SendStream.error (/Users/jonham/code/part/get-web-pc/node_modules/serve-static/index.js:121:7)
  at emitOne (events.js:116:13)
  at SendStream.emit (events.js:211:7)
  at SendStream.error (/Users/jonham/code/part/get-web-pc/node_modules/serve-static/node_modules/send/index.js:270:17)
This question is available on Nuxt community (#c115)
ghost commented 5 years ago

This issue as been imported as question since it does not respect express-template issue template. Only bug reports and feature requests stays open to reduce maintainers workload. If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically. Your question is available at https://cmty.app/nuxt/express-template/issues/c115.

Jonham commented 5 years ago
$ node --version
v8.11.1
$ npm --version
6.4.1

OS: MacBook Pro