- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在开发一个 meteor 应用程序,我也希望将其作为渐进式网络应用程序。我没有在 meteor 或渐进式网络应用程序文档中找到有关链接manifest.json文件的任何内容。
我最初尝试链接文件夹根目录中的 manifest.json 文件,然后在客户端文件夹的 main.html(即:../manifest.json)中指向它,但这不起作用,然后我尝试移动 list 。我在客户端文件夹中添加了 package.json 并将其链接为 ./manifest.json 但这也不起作用。检查开发工具>应用程序> list 后,它向我显示以下屏幕:按“添加到主屏幕”后,我收到以下错误:
Site cannot be installed: the manifest could not be fetched, is empty, or could not be parsed
此外,当我转到 localhost:3000/manifest.json 时,它会提供以下内容(看起来像依赖项列表
{"format":"web-program-pre1","manifest":[{"path":"packages/underscore.js","where":"client","type":"js","cacheable":true,"url":"/packages/underscore.js?hash=cde485f60699ff9aced3305f70189e39c665183c","size":150249,"hash":"cde485f60699ff9aced3305f70189e39c665183c"},{"path":"packages/meteor.js","where":"client","type":"js","cacheable":true,"url":"/packages/meteor.js?hash=27829e936d09beae3149ecfbf3332c42ccb1596f","size":121106,"hash":"27829e936d09beae3149ecfbf3332c42ccb1596f"},{"path":"packages/meteor-base.js","where":"client","type":"js","cacheable":true,"url":"/packages/meteor-base.js?hash=a4d07a6b394e56bbe6ccc773c95e7cdb3434960d","size":720,"hash":"a4d07a6b394e56bbe6ccc773c95e7cdb3434960d"},{"path":"packages/mobile-experience.js","where":"client","type":"js","cacheable":true,"url":"/packages/mobile-experience.js?hash=8ded3e69a3e367f321ab9a2b52e3ecdd2661a365","size":726,"hash":"8ded3e69a3e367f321ab9a2b52e3ecdd2661a365"},{"path":"packages/modules-runtime.js","where":"client","type":"js","cacheable":true,"url":"/packages/modules-runtime.js?hash=2b888cb7873bacf38cf32f41d44ac3d4fd600b06","size":42886,"hash":"2b888cb7873bacf38cf32f41d44ac3d4fd600b06"},{"path":"packages/modules.js","where":"client","type":"js","cacheable":true,"url":"/packages/modules.js?hash=33df952a92dbc669360ee4d44c315250c4cc9438","size":3580788,"hash":"33df952a92dbc669360ee4d44c315250c4cc9438"},{"path":"packages/es5-shim.js","where":"client","type":"js","cacheable":true,"url":"/packages/es5-shim.js?hash=adc3c6270d5697523fe2a72e73428390b7eba83a","size":346492,"hash":"adc3c6270d5697523fe2a72e73428390b7eba83a"},{"path":"packages/promise.js","where":"client","type":"js","cacheable":true,"url":"/packages/promise.js?hash=c7ad465683112ebc31f372d2545b70d85b822c0d","size":65779,"hash":"c7ad465683112ebc31f372d2545b70d85b822c0d"},{"path":"packages/ecmascript-runtime.js","where":"client","type":"js","cacheable":true,"url":"/packages/ecmascript-runtime.js?hash=04c184f5bc9ce59705dac3ac894ecb3ca60eb387","size":519496,"hash":"04c184f5bc9ce59705dac3ac894ecb3ca60eb387"},{"path":"packages/babel-compiler.js","where":"client","type":"js","cacheable":true,"url":"/packages/babel-compiler.js?hash=a9546d4e245cfe40b406e08d40bf106241f01683","size":723,"hash":"a9546d4e245cfe40b406e08d40bf106241f01683"},{"path":"packages/ecmascript.js","where":"client","type":"js","cacheable":true,"url":"/packages/ecmascript.js?hash=370a8752194bcf73be7fffa3635715d0fbf7853d","size":716,"hash":"370a8752194bcf73be7fffa3635715d0fbf7853d"},{"path":"packages/base64.js","where":"client","type":"js","cacheable":true,"url":"/packages/base64.js?hash=0053489bb30bb5c0e3545df151f83e41150344b0","size":15332,"hash":"0053489bb30bb5c0e3545df151f83e41150344b0"},{"path":"packages/ejson.js","where":"client","type":"js","cacheable":true,"url":"/packages/ejson.js?hash=0f17ced99d522d48cd8f8b2139167fd06babd969","size":81952,"hash":"0f17ced99d522d48cd8f8b2139167fd06babd969"},{"path":"packages/id-map.js","where":"client","type":"js","cacheable":true,"url":"/packages/id-map.js?hash=c7aea8dfa2bf46ff2ae0aa6c6cf09e36abc61d07","size":8189,"hash":"c7aea8dfa2bf46ff2ae0aa6c6cf09e36abc61d07"},{"path":"packages/ordered-dict.js","where":"client","type":"js","cacheable":true,"url":"/packages/ordered-dict.js?hash=bacdd1852075630a01f7de783e5e8e8aa8541cdc","size":20041,"hash":"bacdd1852075630a01f7de783e5e8e8aa8541cdc"},{"path":"packages/tracker.js","where":"client","type":"js","cacheable":true,"url":"/packages/tracker.js?hash=997515fa2d5b0530ba07741da556c4b36963ef3b","size":86619,"hash":"997515fa2d5b0530ba07741da556c4b36963ef3b"},{"path":"packages/babel-runtime.js","where":"client","type":"js","cacheable":true,"url":"/packages/babel-runtime.js?hash=165aebf5a2dbf1fe13aae78554227471ae06f96a","size":11132,"hash":"165aebf5a2dbf1fe13aae78554227471ae06f96a"},{"path":"packages/random.js","where":"client","type":"js","cacheable":true,"url":"/packages/random.js?hash=a3be1ee923a6fc933f063c7f8de3e15243e12f47","sourceMap":"packages/random.js.map","sourceMapUrl":"/packages/a3be1ee923a6fc933f063c7f8de3e15243e12f47.map","size":39765,"hash":"a3be1ee923a6fc933f063c7f8de3e15243e12f47"},{"path":"packages/mongo-id.js","where":"client","type":"js","cacheable":true,"url":"/packages/mongo-id.js?hash=345d169d517353f8146292b4abd24061721f8b26","size":12235,"hash":"345d169d517353f8146292b4abd24061721f8b26"},{"path":"packages/diff-sequence.js","where":"client","type":"js","cacheable":true,"url":"/packages/diff-sequence.js?hash=15014d7b1e11c05111a386992e684ab1d3cc4158","size":24291,"hash":"15014d7b1e11c05111a386992e684ab1d3cc4158"},{"path":"packages/geojson-utils.js","where":"client","type":"js","cacheable":true,"url":"/packages/geojson-utils.js?hash=b204c7d4caf119e6883522fb87c6cce060724bf0","size":46635,"hash":"b204c7d4caf119e6883522fb87c6cce060724bf0"},{"path":"packages/minimongo.js","where":"client","type":"js","cacheable":true,"url":"/packages/minimongo.js?hash=5f645b1615e1812c2bfd57e137c77c24162c7884","sourceMap":"packages/minimongo.js.map","sourceMapUrl":"/packages/5f645b1615e1812c2bfd57e137c77c24162c7884.map","size":488122,"hash":"5f645b1615e1812c2bfd57e137c77c24162c7884"},{"path":"packages/check.js","where":"client","type":"js","cacheable":true,"url":"/packages/check.js?hash=87c633843915b879a0c9676ea81f1cd351296e41","size":67991,"hash":"87c633843915b879a0c9676ea81f1cd351296e41"},{"path":"packages/retry.js","where":"client","type":"js","cacheable":true,"url":"/packages/retry.js?hash=1e409617b538ff3e2b0238b15e45b3380c51a224","size":6891,"hash":"1e409617b538ff3e2b0238b15e45b3380c51a224"},{"path":"packages/ddp-common.js","where":"client","type":"js","cacheable":true,"url":"/packages/ddp-common.js?hash=d42359bcace6c66ac90e2782193494253ee68155","size":45313,"hash":"d42359bcace6c66ac90e2782193494253ee68155"},{"path":"packages/reload.js","where":"client","type":"js","cacheable":true,"url":"/packages/reload.js?hash=628b069673bffbc7390ba84ece8809c8c88c2eed","size":26433,"hash":"628b069673bffbc7390ba84ece8809c8c88c2eed"},{"path":"packages/ddp-client.js","where":"client","type":"js","cacheable":true,"url":"/packages/ddp-client.js?hash=d69811b75e636077a323c16b077a38a29bacca9e","sourceMap":"packages/ddp-client.js.map","sourceMapUrl":"/packages/d69811b75e636077a323c16b077a38a29bacca9e.map","size":637472,"hash":"d69811b75e636077a323c16b077a38a29bacca9e"},{"path":"packages/ddp.js","where":"client","type":"js","cacheable":true,"url":"/packages/ddp.js?hash=25dc3f428447c81620c91c4245dbc6e4f7d32fb7","size":874,"hash":"25dc3f428447c81620c91c4245dbc6e4f7d32fb7"},{"path":"packages/ddp-server.js","where":"client","type":"js","cacheable":true,"url":"/packages/ddp-server.js?hash=1beefbc7bd033ea687e7ab8fbd5694df072662af","size":719,"hash":"1beefbc7bd033ea687e7ab8fbd5694df072662af"},{"path":"packages/allow-deny.js","where":"client","type":"js","cacheable":true,"url":"/packages/allow-deny.js?hash=0a3547d203dfd89d9484cad533c54cd0f4778263","sourceMap":"packages/allow-deny.js.map","sourceMapUrl":"/packages/0a3547d203dfd89d9484cad533c54cd0f4778263.map","size":62341,"hash":"0a3547d203dfd89d9484cad533c54cd0f4778263"},{"path":"packages/insecure.js","where":"client","type":"js","cacheable":true,"url":"/packages/insecure.js?hash=a0e5f17c280f4c7b05178d36a7ceb07cb7b086c6","size":714,"hash":"a0e5f17c280f4c7b05178d36a7ceb07cb7b086c6"},{"path":"packages/mongo.js","where":"client","type":"js","cacheable":true,"url":"/packages/mongo.js?hash=83e088259340bb5e2ce8c879da15b15b9592f8ee","sourceMap":"packages/mongo.js.map","sourceMapUrl":"/packages/83e088259340bb5e2ce8c879da15b15b9592f8ee.map","size":99184,"hash":"83e088259340bb5e2ce8c879da15b15b9592f8ee"},{"path":"packages/blaze-html-templates.js","where":"client","type":"js","cacheable":true,"url":"/packages/blaze-html-templates.js?hash=6e8335ce66460e45f00da73c7497654c5e26e236","size":729,"hash":"6e8335ce66460e45f00da73c7497654c5e26e236"},{"path":"packages/reactive-var.js","where":"client","type":"js","cacheable":true,"url":"/packages/reactive-var.js?hash=ec712fa3ae588c4a1e7017f0bb4507c725391225","size":13609,"hash":"ec712fa3ae588c4a1e7017f0bb4507c725391225"},{"path":"packages/standard-minifier-css.js","where":"client","type":"js","cacheable":true,"url":"/packages/standard-minifier-css.js?hash=cfe82682f4394d3ffc6335555c1f9f3f73294507","size":730,"hash":"cfe82682f4394d3ffc6335555c1f9f3f73294507"},{"path":"packages/standard-minifier-js.js","where":"client","type":"js","cacheable":true,"url":"/packages/standard-minifier-js.js?hash=041bab58c8a89172eaab795deb5d96e38b64ec37","size":729,"hash":"041bab58c8a89172eaab795deb5d96e38b64ec37"},{"path":"packages/shell-server.js","where":"client","type":"js","cacheable":true,"url":"/packages/shell-server.js?hash=6ff1313e4bf7618e577eb2604a580b2ea9b7631f","size":721,"hash":"6ff1313e4bf7618e577eb2604a580b2ea9b7631f"},{"path":"packages/autopublish.js","where":"client","type":"js","cacheable":true,"url":"/packages/autopublish.js?hash=073bd4c42d2fb6182c944501b4f30e8d17bcceb3","size":717,"hash":"073bd4c42d2fb6182c944501b4f30e8d17bcceb3"},{"path":"packages/webapp.js","where":"client","type":"js","cacheable":true,"url":"/packages/webapp.js?hash=8024f6bce97bd768bcff7fc9d76449e74f051e36","sourceMap":"packages/webapp.js.map","sourceMapUrl":"/packages/8024f6bce97bd768bcff7fc9d76449e74f051e36.map","size":3001,"hash":"8024f6bce97bd768bcff7fc9d76449e74f051e36"},{"path":"packages/livedata.js","where":"client","type":"js","cacheable":true,"url":"/packages/livedata.js?hash=7cf1831a60b48e304b054aee1ae0f7e38ff35d09","size":958,"hash":"7cf1831a60b48e304b054aee1ae0f7e38ff35d09"},{"path":"packages/hot-code-push.js","where":"client","type":"js","cacheable":true,"url":"/packages/hot-code-push.js?hash=2e864a0bdd0d5f686115099f8c48eb6c866b5b14","size":722,"hash":"2e864a0bdd0d5f686115099f8c48eb6c866b5b14"},{"path":"packages/jquery.js","where":"client","type":"js","cacheable":true,"url":"/packages/jquery.js?hash=c57b3cfa0ca9c66400d4456b6f6f1e486ee10aad","size":1297965,"hash":"c57b3cfa0ca9c66400d4456b6f6f1e486ee10aad"},{"path":"packages/observe-sequence.js","where":"client","type":"js","cacheable":true,"url":"/packages/observe-sequence.js?hash=8fe58036c6ba00c458f54c360a21fd0e41fb7ee0","size":33341,"hash":"8fe58036c6ba00c458f54c360a21fd0e41fb7ee0"},{"path":"packages/deps.js","where":"client","type":"js","cacheable":true,"url":"/packages/deps.js?hash=7313f5a2685c6c2c673c78c15c8ce86ff59ab0c9","size":932,"hash":"7313f5a2685c6c2c673c78c15c8ce86ff59ab0c9"},{"path":"packages/htmljs.js","where":"client","type":"js","cacheable":true,"url":"/packages/htmljs.js?hash=1ac878018eee6c53ed1375dc7ee75fc6865666ae","size":60540,"hash":"1ac878018eee6c53ed1375dc7ee75fc6865666ae"},{"path":"packages/blaze.js","where":"client","type":"js","cacheable":true,"url":"/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761","size":472754,"hash":"f33d3dfed63a491d24e3aa07ad66c24b5fe8c761"},{"path":"packages/spacebars.js","where":"client","type":"js","cacheable":true,"url":"/packages/spacebars.js?hash=ebf9381e7fc625d41acb0df14995b7614360858a","size":26814,"hash":"ebf9381e7fc625d41acb0df14995b7614360858a"},{"path":"packages/templating-compiler.js","where":"client","type":"js","cacheable":true,"url":"/packages/templating-compiler.js?hash=a71883cdec50e95ca135291415990753ed6d57fc","size":728,"hash":"a71883cdec50e95ca135291415990753ed6d57fc"},{"path":"packages/templating-runtime.js","where":"client","type":"js","cacheable":true,"url":"/packages/templating-runtime.js?hash=c18de19afda6e9f0db7faf3d4382a4c953cabe18","size":24132,"hash":"c18de19afda6e9f0db7faf3d4382a4c953cabe18"},{"path":"packages/templating.js","where":"client","type":"js","cacheable":true,"url":"/packages/templating.js?hash=c2cf38de06efb47f67affb2dff9320e5eef33893","size":909,"hash":"c2cf38de06efb47f67affb2dff9320e5eef33893"},{"path":"packages/launch-screen.js","where":"client","type":"js","cacheable":true,"url":"/packages/launch-screen.js?hash=2f56943306c7e900ed9f4d894b87f534ebffeaeb","size":8391,"hash":"2f56943306c7e900ed9f4d894b87f534ebffeaeb"},{"path":"packages/ui.js","where":"client","type":"js","cacheable":true,"url":"/packages/ui.js?hash=039c55a98376abd03d9d8cd4100895861b897643","size":979,"hash":"039c55a98376abd03d9d8cd4100895861b897643"},{"path":"packages/autoupdate.js","where":"client","type":"js","cacheable":true,"url":"/packages/autoupdate.js?hash=1fd9cf3472adaa6887170d88ab5ea1ddabf695fa","size":17200,"hash":"1fd9cf3472adaa6887170d88ab5ea1ddabf695fa"},{"path":"packages/global-imports.js","where":"client","type":"js","cacheable":true,"url":"/packages/global-imports.js?hash=ab884bfb9c930842d4ada35f58a36f5c48629abe","size":1047,"hash":"ab884bfb9c930842d4ada35f58a36f5c48629abe"},{"path":"app/app.js","where":"client","type":"js","cacheable":true,"url":"/app/app.js?hash=9965fafa8dfa48f31fe2eae4ac85a6116d596ca3","sourceMap":"app/app.js.map","sourceMapUrl":"/app/9965fafa8dfa48f31fe2eae4ac85a6116d596ca3.map","size":20675,"hash":"9965fafa8dfa48f31fe2eae4ac85a6116d596ca3"},{"path":"merged-stylesheets.css","where":"client","type":"css","cacheable":true,"url":"/merged-stylesheets.css?hash=1a165863f95fc2ba4d6af1034a1380b15db31f19","sourceMap":"merged-stylesheets.css.map","sourceMapUrl":"/1a165863f95fc2ba4d6af1034a1380b15db31f19.map","size":30,"hash":"1a165863f95fc2ba4d6af1034a1380b15db31f19"},{"path":"head.html","where":"internal","type":"head","hash":"9a17c869454948d630b8d20c4b9837b2e1f402a1"}],"version":"cfd2bd53671a5ca4ca4da9eca9eadb7f4d4a4ee6","PUBLIC_SETTINGS":{}}
这与program.json文件(/.meteor/local/build/programs/web.browser/program.json)中的数据相同,因此我尝试将一个对象(下面的对象)添加到 list 数组中使用我的manifest.json数据,它不会让我保存文件(无法保存/.meteor/local/build/programs/web.browser/program.json)。
{
"name": "<My app>",
"short_name": "my app",
"start_url": "/",
"display": "standalone",
"background_color": "#3E4EB8",
"theme_color": "#2F3BA2"
}
有谁知道如何添加我的 list 信息以使我的应用程序按我想要的方式工作?
最佳答案
meteor 为自己保留了/manifest.json,所以你不能使用它。
解决方案是使用 list 文件的另一个 URL。试试这个:
在 html 中定义 的位置,添加以下行:
<head>
[...]
<link rel="manifest" href="/site_manifest.json">
[...]
</head>
将 list 文件 ('site_manifest.json') 放入/public 文件夹中。现在应该可以工作了。
关于meteor - 使用 MeteorJS 的渐进式 Web 应用程序,如何链接 manifest.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45283760/
我是 C 语言新手,我编写了这个 C 程序,让用户输入一年中的某一天,作为返回,程序将输出月份以及该月的哪一天。该程序运行良好,但我现在想简化该程序。我知道我需要一个循环,但我不知道如何去做。这是程序
我一直在努力找出我的代码有什么问题。这个想法是创建一个小的画图程序,并有红色、绿色、蓝色和清除按钮。我有我能想到的一切让它工作,但无法弄清楚代码有什么问题。程序打开,然后立即关闭。 import ja
我想安装screen,但是接下来我应该做什么? $ brew search screen imgur-screenshot screen
我有一个在服务器端工作的 UDP 套接字应用程序。为了测试服务器端,我编写了一个简单的 python 客户端程序,它发送消息“hello world how are you”。服务器随后应接收消息,将
我有一个 shell 脚本,它运行一个 Python 程序来预处理一些数据,然后运行一个 R 程序来执行一些长时间运行的任务。我正在学习使用 Docker 并且我一直在运行 FROM r-base:l
在 Linux 中。我有一个 c 程序,它读取一个 2048 字节的文本文件作为输入。我想从 Python 脚本启动 c 程序。我希望 Python 脚本将文本字符串作为参数传递给 c 程序,而不是将
前言 最近开始整理笔记里的库存草稿,本文是 23 年 5 月创建的了(因为中途转移到 onedrive,可能还不止) 网页调起电脑程序是经常用到的场景,比如百度网盘下载,加入 QQ 群之类的 我
对于一个类,我被要求编写一个 VHDL 程序,该程序接受两个整数输入 A 和 B,并用 A+B 替换 A,用 A-B 替换 B。我编写了以下程序和测试平台。它完成了实现和行为语法检查,但它不会模拟。尽
module Algorithm where import System.Random import Data.Maybe import Data.List type Atom = String ty
我想找到两个以上数字的最小公倍数 求给定N个数的最小公倍数的C++程序 最佳答案 int lcm(int a, int b) { return (a/gcd(a,b))*b; } 对于gcd,请查看
这个程序有错误。谁能解决这个问题? Error is :TempRecord already defines a member called 'this' with the same paramete
当我运行下面的程序时,我在 str1 和 str2 中得到了垃圾值。所以 #include #include #include using namespace std; int main() {
这是我的作业: 一对刚出生的兔子(一公一母)被放在田里。兔子在一个月大时可以交配,因此在第二个月的月底,每对兔子都会生出两对新兔子,然后死去。 注:在第0个月,有0对兔子。第 1 个月,有 1 对兔子
我编写了一个程序,通过对字母使用 switch 命令将十进制字符串转换为十六进制,但是如果我使用 char,该程序无法正常工作!没有 switch 我无法处理 9 以上的数字。我希望你能理解我,因为我
我是 C++ 新手(虽然我有一些 C 语言经验)和 MySQL,我正在尝试制作一个从 MySQL 读取数据库的程序,我一直在关注这个 tutorial但当我尝试“构建”解决方案时出现错误。 (我正在使
仍然是一个初学者,只是尝试使用 swift 中的一些基本函数。 有人能告诉我这段代码有什么问题吗? import UIKit var guessInt: Int var randomNum = arc
我正在用 C++11 编写一个函数,它采用 constant1 + constant2 形式的表达式并将它们折叠起来。 constant1 和 constant2 存储在 std::string 中,
我用 C++ 编写了这段代码,使用运算符重载对 2 个矩阵进行加法和乘法运算。当我执行代码时,它会在第 57 行和第 59 行产生错误,非法结构操作(两行都出现相同的错误)。请解释我的错误。提前致谢:
我是 C++ 的初学者,我想编写一个简单的程序来交换字符串中的两个字符。 例如;我们输入这个字符串:“EXAMPLE”,我们给它交换这两个字符:“E”和“A”,输出应该类似于“AXEMPLA”。 我在
我需要以下代码的帮助: 声明 3 个 double 类型变量,每个代表三角形的三个边中的一个。 提示用户为第一面输入一个值,然后 将用户的输入设置为您创建的代表三角形第一条边的变量。 将最后 2 个步
我是一名优秀的程序员,十分优秀!