gpt4 book ai didi

javascript - Sapper 不断从客户端收到有关 'this' 关键字的警告?

转载 作者:行者123 更新时间:2023-12-04 17:31:54 27 4
gpt4 key购买 nike

不断从客户端收到此警告,但不完全确定是什么导致了它。任何正确方向的指导都会非常有帮助!

• client
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __extends = (this && this.__extends) || (function () {
^
2: var extendStatics = function (d, b) {
3: extendStatics = Object.setPrototypeOf ||
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __extends = (this && this.__extends) || (function () {
^
2: var extendStatics = function (d, b) {
3: extendStatics = Object.setPrototypeOf ||
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __assign = (this && this.__assign) || function () {
^
2: __assign = Object.assign || function(t) {
3: for (var s, i = 1, n = arguments.length; i < n; i++) {
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __assign = (this && this.__assign) || function () {
^
2: __assign = Object.assign || function(t) {
3: for (var s, i = 1, n = arguments.length; i < n; i++) {

最佳答案

通过将以下代码添加到我的客户端汇总包中,我能够解决这个问题。

上下文:“窗口”

这是与此错误相关的文档: https://rollupjs.org/guide/en/#error-this-is-undefined

关于javascript - Sapper 不断从客户端收到有关 'this' 关键字的警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58790619/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com