Sitemap.xml的角度通用性(手套不是功能)

时间:2018-12-14 06:37:18

标签: angular seo angular-universal

我收到此错误。当我在server.ts文件中构建有角度的通用应用程序时。这显示下面的错误。

应用程序版本:7.1.3

ZoneAwarePromise {
  __zone_symbol__state: 0,
  __zone_symbol__value:
   TypeError: mitt is not a function
       at new SitemapGenerator (E:\angular projects\run-app\dist\server.js:107657:19)
       at E:\angular projects\run-app\dist\server.js:107577:25
       at new ZoneAwarePromise (E:\angular projects\run-app\dist\server.js:1074:29)
       at sitemap (E:\angular projects\run-app\dist\server.js:107575:12)
       at E:\angular projects\run-app\dist\server.js:160:90
       at ZoneDelegate.module.exports.ZoneDelegate.invokeTask (E:\angular projects\run-app\dist\server.js:604:31)
       at Zone.module.exports.Zone.runTask (E:\angular projects\run-app\dist\server.js:371:47)
       at module.exports.ZoneTask.invokeTask (E:\angular projects\run-app\dist\server.js:679:34)
       at ZoneTask.invoke (E:\angular projects\run-app\dist\server.js:668:48)
       at data.args.(anonymous function) (E:\angular projects\run-app\dist\server.js:1500:25) }
generating site map..3 http://localhost:8080
Unhandled Promise rejection: mitt is not a function ; Zone: <root> ; Task: fs.exists ; Value: TypeError: mitt is not a function
    at new SitemapGenerator (E:\angular projects\run-app\dist\server.js:107657:19)
    at E:\angular projects\run-app\dist\server.js:107577:25
    at new ZoneAwarePromise (E:\angular projects\run-app\dist\server.js:1074:29)
    at sitemap (E:\angular projects\run-app\dist\server.js:107575:12)
    at E:\angular projects\run-app\dist\server.js:160:90
    at ZoneDelegate.module.exports.ZoneDelegate.invokeTask (E:\angular projects\run-app\dist\server.js:604:31)
    at Zone.module.exports.Zone.runTask (E:\angular projects\run-app\dist\server.js:371:47)
    at module.exports.ZoneTask.invokeTask (E:\angular projects\run-app\dist\server.js:679:34)
    at ZoneTask.invoke (E:\angular projects\run-app\dist\server.js:668:48)
    at data.args.(anonymous function) (E:\angular projects\run-app\dist\server.js:1500:25) TypeError: mitt is not a function
    at new SitemapGenerator (E:\angular projects\run-app\dist\server.js:107657:19)
    at E:\angular projects\run-app\dist\server.js:107577:25
    at new ZoneAwarePromise (E:\angular projects\run-app\dist\server.js:1074:29)
    at sitemap (E:\angular projects\run-app\dist\server.js:107575:12)
    at E:\angular projects\run-app\dist\server.js:160:90
    at ZoneDelegate.module.exports.ZoneDelegate.invokeTask (E:\angular projects\run-app\dist\server.js:604:31)
    at Zone.module.exports.Zone.runTask (E:\angular projects\run-app\dist\server.js:371:47)
    at module.exports.ZoneTask.invokeTask (E:\angular projects\run-app\dist\server.js:679:34)
    at ZoneTask.invoke (E:\angular projects\run-app\dist\server.js:668:48)
    at data.args.(anonymous function) (E:\angular projects\run-app\dist\server.js:1500:25)

请为我提供更好的解决方案。我正在使用npm run build:prd进行角度通用。

0 个答案:

没有答案