重新编译 build.py 文件时缺少 goog.date 的提供程序 - google 块
Missing provider for goog.date when recompiling the build.py file - google blockly
我们在 blockly.js 文件中添加了 field_date 并尝试重新编译 build.py 文件,但是当 运行 时,它会抛出缺少提供程序的错误 goog.date。我们如何解决这个问题我们正在使用最新的块状版本。
Google 正在慢慢地从 blockly 中删除闭包库依赖项。所以默认情况下不再添加闭包库。
field_date 依赖闭包库。所以需要手动添加到库中,需要重建库。实现这一点的过程在 FieldDate documentation -
块中作为警告文本提到
Warning: Due to its limited use and large footprint, FieldDate
is not
compiled into Blockly by default. To use it you will need to require
it and rebuild. Add goog.require('Blockly.FieldDate')
to your project,
or uncomment it inside blockly.js to enable it. FieldDate
also depends
on the Closure Library which is no longer compiled into Blockly by
default. You will need to add google-closure-library
to your
package.json and rebuild with the --closure-library
flag: gulp build
--closure-library
.
我们在 blockly.js 文件中添加了 field_date 并尝试重新编译 build.py 文件,但是当 运行 时,它会抛出缺少提供程序的错误 goog.date。我们如何解决这个问题我们正在使用最新的块状版本。
Google 正在慢慢地从 blockly 中删除闭包库依赖项。所以默认情况下不再添加闭包库。
field_date 依赖闭包库。所以需要手动添加到库中,需要重建库。实现这一点的过程在 FieldDate documentation -
块中作为警告文本提到Warning: Due to its limited use and large footprint,
FieldDate
is not compiled into Blockly by default. To use it you will need to require it and rebuild. Addgoog.require('Blockly.FieldDate')
to your project, or uncomment it inside blockly.js to enable it.FieldDate
also depends on the Closure Library which is no longer compiled into Blockly by default. You will need to addgoogle-closure-library
to your package.json and rebuild with the--closure-library
flag:gulp build --closure-library
.