在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ vue使用PrerenderSpaPlugin插件build報錯

vue使用PrerenderSpaPlugin插件build報錯

我在vue 的項目里使用PrerenderSpaPlugin插件進(jìn)行預(yù)編譯,總是報如下的錯誤:

| building for production...E:\web\sell\node_modules\prerender-spa-plugin\lib\compile-to-html.js:82
                    if (error) throw error
                               ^

Error: Command failed: E:\web\sell\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe E:\web\sell\node_modules\prerender-spa-plugin\lib\phantom-page-render.js http://localhost:8000/ {}

    at ChildProcess.exithandler (child_process.js:204:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sell@1.0.0 build: `node build/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sell@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\29488\AppData\Roaming\npm-cache\_logs\2018-03-06T07_21_11_126Z-debug.log

這是我的webpack.prod.conf.js中關(guān)于PrerenderSpaPlugin插件的配置

new PrerenderSpaPlugin(
      // Absolute path to compiled SPA
      path.join(__dirname,'../dist'),
      // List of routes to prerender
      [ '/', '/order', '/main' ]
    )

花了一下午時間也沒解決,求大佬解答

回答
編輯回答
別逞強(qiáng)

Have you found a solution for that ?

PS : Sorry my Chinese isn't on point

2017年9月16日 06:11
編輯回答
離魂曲

題主解決了嗎

2017年8月12日 17:37