收藏
回答

无法编译,提示[ appservice 生成错误]是什么问题?

升级了微信者工具(版本为1.05.2107221),原来可编译的项目抛出[ appservice 生成错误]是什么问题?


回答关注问题邀请回答
收藏

3 个回答

  • 工号 9527
    工号 9527
    2021-09-06

    看下具体报错

    2021-09-06
    有用
    回复 10
    • Ant
      Ant
      2021-09-06
      [sitemap 索引情况提示] 根据 sitemap 的规则[0],当前页面 [pages/main/main] 将被索引
      [ appservice 生成错误] sdk/libs/xmldom/dom-parser.js: file: sdk/libs/xmldom/dom-parser.js
       unknown: Identifier 'DOMParser' has already been declared. (255:8)
        253 | var XMLSerializer = exports.XMLSerializer = require('./dom').XMLSerializer;
        254 | exports.DOMParser = DOMParser;
      > 255 | var DOMParser = {
            | ^
        256 | DOMImplementation: DOMImplementation,
        257 | XMLSerializer: XMLSerializer,
        258 | DOMParser: DOMParser
      VM142:5 app.js错误:
       Error: module "sdk/libs/xmldom/dom-parser" is not defined
          at require (VM152 WAService.js:2)
          at VM152 WAService.js:2
          at strophe.js? [sm]:21
          at require (VM152 WAService.js:2)
          at VM152 WAService.js:2
          at app.js? [sm]:2
          at require (VM152 WAService.js:2)
          at <anonymous>:3:9
          at doWhenAllScriptLoaded (<anonymous>:4721:21)
          at Object.scriptLoaded (<anonymous>:4749:5)
      (anonymous) @ VM142:5
      doWhenAllScriptLoaded @ VM27:4721
      scriptLoaded @ VM27:4749
      (anonymous) @ VM27:4774
      Promise.then (async)
      (anonymous) @ VM27:4795
      (anonymous) @ VM27:4799
      loadScripts @ VM13 assubloader.js:1
      async function (async)
      loadScripts @ VM13 assubloader.js:1
      loadAppResourceScripts @ VM13 assubloader.js:1
      (anonymous) @ instanceframe?s=1630905474694&autoload:5
      VM18 WAService.js:2 thirdScriptError
      module "sdk/libs/xmldom/dom-parser" is not defined
      Error: module "sdk/libs/xmldom/dom-parser" is not defined
          at require (http://127.0.0.1:42909/appservice/__dev__/WAService.js?t=wechat&s=1630905469307&v=2.11.0:2:1812259)
          at http://127.0.0.1:42909/appservice/__dev__/WAService.js?t=wechat&s=1630905469307&v=2.11.0:2:1812010
          at http://127.0.0.1:42909/appservice/sdk/libs/strophe.js:26:14
          at require (http://127.0.0.1:42909/appservice/__dev__/WAService.js?t=wechat&s=1630905469307&v=2.11.0:2:1812400)
          at http://127.0.0.1:42909/appservice/__dev__/WAService.js?t=wechat&s=1630905469307&v=2.11.0:2:1812010
          at http://127.0.0.1:42909/appservice/app.js:6:1
          at require (http://127.0.0.1:42909/appservice/__dev__/WAService.js?t=wechat&s=1630905469307&v=2.11.0:2:1812400)
          at <anonymous>:3:9
          at doWhenAllScriptLoaded (<anonymous>:4721:21)
          at Object.scriptLoaded (<anonymous>:4749:5)
      errorReport @ VM18 WAService.js:2
      thirdErrorReport @ VM18 WAService.js:2
      (anonymous) @ VM18 WAService.js:2
      f @ VM18 WAService.js:2
      o @ VM18 WAService.js:2
      c @ VM8 asdebug.js:1
      window.onerror @ VM12:1
      doWhenAllScriptLoaded @ VM27:4721
      scriptLoaded @ VM27:4749
      (anonymous) @ VM27:4774
      error (async)
      t.default @ VM12:1
      137 @ VM12:1
      n @ VM12:1
      (anonymous) @ VM12:1
      (anonymous) @ VM12:1
      2021-09-06
      回复
    • 工号 9527
      工号 9527
      2021-09-07回复Ant
      这个文件首行加 // use strict disable;
      2021-09-07
      回复
    • Ant
      Ant
      2021-09-07
      是这样?加到app.js里面?没有作用,还是一堆错误。加其他几个被引用的js首行也一样没作用。
      2021-09-07
      回复
    • 工号 9527
      工号 9527
      发表于小程序端
      2021-09-08回复Ant

      dom-parser这个文件

      2021-09-08
      回复
    • Ant
      Ant
      2021-09-08
      试过了,这几个相关的js文件,都加了这一句还是一样的错误
      2021-09-08
      回复
    查看更多(5)
  • 明天
    明天
    2022-08-04


    变量名重复声明,导致报错,改下变量名就可以

    2022-08-04
    有用
    回复
  • W-Gargon
    W-Gargon
    2021-11-19

    我也遇到同样的问题,最后怎么处理的?

    2021-11-19
    有用
    回复
登录 后发表内容