首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到变量: Safari中的BigInt64Array

找不到变量: Safari中的BigInt64Array
EN

Stack Overflow用户
提问于 2020-10-07 01:31:46
回答 1查看 881关注 0票数 0

就在最近,我的Range8web应用程序停止了Safari (卡在index.html页面上)的工作。它在调试器中抛出一个错误,声明:找不到变量:BigInt64Array,,我没有通过npm升级任何东西,所以我不知道为什么突然开始发生这种情况。我尝试将target从tsconfig.js中的"es2015“改为”es2015“。我还将Safari >= 10添加到浏览器列表中,但没有运气。有什么想法吗?谢谢!

package.json

代码语言:javascript
复制
{
  "name": "webapi",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "build:ssr": "ng run WebApi:server:dev",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "8.2.12",
    "@angular/cdk": "^8.2.3",
    "@angular/common": "8.2.12",
    "@angular/compiler": "8.2.12",
    "@angular/core": "8.2.12",
    "@angular/forms": "8.2.12",
    "@angular/material": "^8.2.3",
    "@angular/platform-browser": "8.2.12",
    "@angular/platform-browser-dynamic": "8.2.12",
    "@angular/platform-server": "8.2.12",
    "@angular/router": "8.2.12",
    "@babel/compat-data": "^7.8.0",
    "@fortawesome/angular-fontawesome": "^0.5.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.28",
    "@fortawesome/free-solid-svg-icons": "^5.13.0",
    "@ngu/carousel": "^1.5.5",
    "@nguniversal/module-map-ngfactory-loader": "8.1.1",
    "angular-cd-timer": "^1.0.0",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^4.4.1",
    "core-js": "^3.3.3",
    "deep-copy-ts": "^0.5.0",
    "font-awesome": "^4.7.0",
    "hammerjs": "^2.0.8",
    "jquery": "^3.4.1",
    "ngx-spinner": "^9.0.2",
    "oidc-client": "^1.9.1",
    "popper.js": "^1.16.1",
    "rxjs": "^6.5.3",
    "zone.js": "0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.24",
    "@angular/cli": "^8.3.14",
    "@angular/compiler-cli": "8.2.12",
    "@angular/language-service": "8.2.12",
    "@types/jasmine": "~3.4.4",
    "@types/jasminewd2": "~2.0.8",
    "@types/node": "~12.11.6",
    "codelyzer": "^5.2.0",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.4.1",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.0",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "typescript": "3.5.3"
  },
  "resolutions": {
    "@babel/preset-env": "7.5.5"
  },
  "optionalDependencies": {
    "node-sass": "^4.12.0",
    "protractor": "~5.4.2",
    "ts-node": "~8.4.1",
    "tslint": "~5.20.0"
  }
}

tsconfig.json

代码语言:javascript
复制
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "module": "esnext",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "ES5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

浏览器列表

代码语言:javascript
复制
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
ios_saf >= 10
Safari >= 10
not dead
# IE 9-11
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-14 18:32:40

事实证明,"deep-copy-ts": "^0.5.0",是问题所在。这个包需要BigInt64Array,是Safari上的重大变化。一旦移除它就开始工作了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64235957

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档