- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在一个 Angular 网站上工作。
这是我的生产 package.json:
"dependencies": {
"@angular/animations": "^5.0.2",
"@angular/cdk": "^5.1.0",
"@angular/common": "^5.0.2",
"@angular/compiler": "^5.0.2",
"@angular/core": "^5.0.2",
"@angular/flex-layout": "^2.0.0-beta.12",
"@angular/forms": "^5.0.2",
"@angular/http": "^5.0.2",
"@angular/material": "^5.1.0",
"@angular/platform-browser": "^5.0.2",
"@angular/platform-browser-dynamic": "^5.0.2",
"@angular/platform-server": "^5.0.2",
"@angular/router": "^5.0.2",
"@ng-bootstrap/ng-bootstrap": "^1.0.0",
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "^2.0.1",
"angular2-cookie-law": "^1.4.0",
"angular2-qrcode": "^2.0.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.1",
"ng-recaptcha": "^3.0.3",
"ng2-ui-auth": "^8.0.1",
"ngx-image-cropper": "^0.1.24",
"ngx-img-cropper": "^0.9.7",
"ngx-slider": "0.0.5",
"rxjs": "^5.5.2",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.18",
"ngx-device-detector" : "1.2.2"
},
"devDependencies": {
"@angular/cli": "^1.5.2",
"@angular/compiler-cli": "^5.0.2",
"@angular/language-service": "^5.0.2",
"@types/jasmine": "2.8.2",
"@types/node": "~8.0.53",
"codelyzer": "~4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.2.0",
"sw-precache": "^5.2.0",
"sw-precache-webpack-plugin": "^0.11.4",
"ts-node": "~3.3.0",
"tslint": "^5.8.0",
"typescript": "~2.4.2"
}
"dependencies": {
"@angular/animations": "^6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/common": "^6.1.10",
"@angular/compiler": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/forms": "^6.1.10",
"@angular/http": "^6.1.10",
"@angular/material": "^6.4.7",
"@angular/material-moment-adapter": "^6.4.7",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/platform-server": "^6.1.10",
"@angular/router": "^6.1.10",
"@ncstate/sat-popover": "^2.1.1",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"angular2-cookie-law": "^6.0.4",
"angular2-qrcode": "^2.0.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.1",
"moment": "^2.18.1",
"ng-recaptcha": "^4.2.1",
"ng2-ui-auth": "^9.0.1",
"ngx-device-detector": "1.3.3",
"ngx-file-drop": "^4.0.6",
"ngx-image-cropper": "^1.2.2",
"ngx-slider": "0.0.5",
"rxjs": "6.0.0",
"rxjs-compat": "^6.0.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.18"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.8.0",
"@angular/cli": "^6.1.10",
"@angular/compiler-cli": "^6.1.10",
"@angular/language-service": "^6.1.10",
"@types/jasmine": "2.8.2",
"@types/node": "~8.0.53",
"codelyzer": "~4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.2.0",
"sw-precache": "^5.2.0",
"sw-precache-webpack-plugin": "^0.11.4",
"ts-node": "~3.3.0",
"tslint": "^5.8.0",
"typescript": "^2.7.2"
}
SyntaxError: expected expression, got '< main.<hash>.js:1
SyntaxError: expected expression, got '< main.c26c44b8b53d610233a3.js:1
<base href="/">
ng build --prod && sw-precache --root=dist --config=precache-config.js
Edit: This is not from time to time. In fact it concerns any changes I am doing on the js
最佳答案
我终于找到了问题的路线原因。
由于我迁移到 angular 6,我的应用程序包现在是 2.97 MB,超过了 sw-precache 默认值 (2.1) 的最大值
我在我的构建日志中发现:
Skipping static resource "dist/main.fd245775d6e1690d968f.js" (2.97 MB) - max size is 2.1 MB
maximumFileSizeToCacheInBytes: 10485760,
关于Angular 6 SyntaxError : expected expression, 得到 '<,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53633182/
我在 Python 2 中尝试了这段代码: def NewFunction(): return '£' 但我收到一条错误消息: SyntaxError: Non-ASCII character
我正在学习xpath,并且我正尝试从html usint xpath获取一些数据 我发现谷歌浏览器可以选择“复制xpath”,效果很好 但不适用于这个例子 some divs
我是 ruby 的初学者。我想修复其中一个邮件软件中的错误。我应用的修复代码如下: @headers[:recipient] = { "To" => (cc.map do |p|
我是初学者级别的python用户,当我在终端中键入以下内容时: $ pydoc Inleesgenbank.py 我收到以下错误消息: ./Inleesgenbank.py中的问题-:语法无效(Inl
我正在编写用于解析电子邮件的脚本,但是以下部分的for循环上有一些SyntaxError: def main(): writer = csv.DictWriter(open('feature
我正在尝试在python33中创建分发文件,但没有成功。 我用嵌套器名称创建了一个文件夹,并在Windows 8的C驱动程序中放入了python33。 此文件夹有2个文件。 nester.py和set
当我尝试导入NumPy时,突然出现以下错误: 更具体地说,它在我键入时显示: import numpy as np 要不就: import numpy 它也会在Python控制台中发生,如下所示: P
在我的 HTML 文件中,我有一行(如下)通过 WiFi 从设备获取响应并使数据可用于我的 JavaScript,它运行良好,除非响应文本中有错误并停止。 响应是一个代表 JavaScript 变量的
我开始使用 Javascript OOP,我编写了我的第一个类,但我在控制台中收到消息错误 这是类(class): class Quote{ deleteQuote(callback){ $(
我正在使用argparse来解析参数,但是当我得到args.global时,出现了一个奇怪的错误,我不知道我哪里做错了 ... parser.add_argument('-u','--update',
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我正在使用argparse来解析参数,但是当我得到args.global时,出现了一个奇怪的错误,我不知道我哪里做错了 ... parser.add_argument('-u','--update',
有什么不同?为什么它会在函数 a() 中出错? function a(){ 1 == 1 ? return true: ""; // Uncaught SyntaxError: Unexpe
我有一个 python 脚本,其中包含如下函数参数的类型声明: def dump_var(v: Variable, name: str = None): 据我所知,这是一个为函数设置输入参数类型的有效
我正在尝试从命令行运行 Python 脚本,这是我的脚本: import sys def printsomething(sys.argv): text = str(sys.argv[1])
我在 macbook 上使用终端将数据打印到打开的文件中: >>> out=open("test_output.txt","w") >>> print("hello",file=out) File
我想排除以下代码产生的错误,但我不知道如何。 from datetime import datetime try: date = datetime(2009, 12a, 31) except:
我想在动态生成的列表中放置一个 onclick 事件。我不能按原样使用它,例如 updateRoomID(arg) ,因为它会立即开火。所以我把它放在一个匿名函数中,按照网上各种来源的建议:funct
我有以下脚本: 测试.py: import sys try: import random print random.random() except: print sys.exc
这个问题在这里已经有了答案: "+=" causing SyntaxError in Python (6 个答案) 关闭 3 年前。 在我的代码中有这些行: if numVotes == 0:
我是一名优秀的程序员,十分优秀!