小程序开发

微信小程序开发:在mpvue项目中按照环境动态引入阿拉丁统计 s

2019-08-01  本文已影响0人  扛着煤气去救火

在mpvue项目中按照环境动态引入阿拉丁统计sdk

出现错误:


thirdScriptError

sdk uncaught third Error

Cannot read property 'getElementsByTagName' of undefined

TypeError: Cannot read property 'getElementsByTagName' of undefined

    at Function.o.e (http://127.0.0.1:60977/appservice/common/manifest.js:21:36)

    at Object.dcK (http://127.0.0.1:60977/appservice/app.js:6:7)

    at o (http://127.0.0.1:60977/appservice/common/manifest.js:39:91)

    at Object.NHnr (http://127.0.0.1:60977/appservice/app.js:29:13)

    at o (http://127.0.0.1:60977/appservice/common/manifest.js:39:91)

    at Object.global.webpackJsonpMpvue (http://127.0.0.1:60977/appservice/common/manifest.js:13:13)

    at http://127.0.0.1:60977/appservice/app.js:5:8

    at require (http://127.0.0.1:60977/appservice/__dev__/WAService.js:1:1016120)

    at <anonymous>:1:1

    at HTMLScriptElement.scriptLoaded (http://127.0.0.1:60977/appservice/appservice?t=1564644391858:21225:21)

解决办法:把import变为require.

上一篇 下一篇

猜你喜欢

热点阅读