Closed tylzh97 closed 7 months ago
NPM will install the maximal version that matches package.json
. The package zotero-types
hasn't had major updates since the 1.0.22 build, so you are probably using the latest version of zotero-types
. So manually run npm install zotero-types@xxx
(use the actual version in your package.json) would help.
tsc
error does not break the building process. Your plugin is still successfully built to a xpi
file.
NPM will install the maximal version that matches
package.json
. The packagezotero-types
hasn't had major updates since the 1.0.22 build, so you are probably using the latest version ofzotero-types
. So manually runnpm install zotero-types@xxx
(use the actual version in your package.json) would help.
tsc
error does not break the building process. Your plugin is still successfully built to axpi
file.
Thanks! I will try to install specify version of zotero-types
. But which branch I should develop in, main
or z6
?
After install specific version of zotero-types
, Still, Plugin install failed:
The add-on "%S" could not be installed. It may be incompatible with this version of Zotero.
main
branch only supports zotero 7main
, as there probably won't be new updates for Zotero 6我好像也是相同問題,在官網載了z6並安裝此附件最新版本時
沒事了,安裝了z7@@
I still got some problem. I'm trying build this plugin v1.0.22. As you said, tsc error
do not break the building process, I got xpi
file in ./build
directory. I install this plugin successfully, but it seems works not correctly. There is no translation config
in Zotero Perferences
page. Errors in following:
[JavaScript Error: "WeakRef is not defined" {file: "resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js" line: 7110}]
createElement@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:7110:15
addStyle@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:9727:25
initializeUI@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:9267:11
node_modules/zotero-plugin-toolkit/dist/managers/prompt.js/Prompt<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:9261:11
node_modules/zotero-plugin-toolkit/dist/managers/prompt.js/PromptManager2<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:9906:36
ZToolkit<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:14013:21
Addon<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:13981:19
@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:14040:25
@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/index.js:2:1
startup@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Admin/AppData/Roaming/Zotero/Zotero/Profiles/tympuzwq.default/extensions/zoteropdftranslate@euclpts.com.xpi!/bootstrap.js:94:3
version => 6.0.27, platform => Win32, oscpu => Windows NT 10.0; WOW64, locale => en-US, appName => Zotero, appVersion => 6.0.27, extensions => Zotero LibreOffice Integration (6.0.4.SA.6.0.27, extension), Zotero Word for Windows Integration (6.0.3.SA.6.0.27, extension), Zotero PDF Translate (1.0.22, extension)
Again, you don’t have the correct version of dependency zotero-plugin-toolkit installed. Please install the specific version manually.
I got it, Thanks!
Before Issue/提问之前
Issues not in the template format will be ignored/不按模板格式或不完整填写模板内容的提问将不会被回复。如果你看不懂英文可以用中文提问,但请有礼貌地详细描述你的问题。如果不详细说明通过什么步骤可以复现问题,具体表现是什么,你正在使用哪个版本的插件,我没办法帮到你。不要浪费大家的时间!!!
Edit the template below and delete the section above/必须准确详细地填写编辑以下提问模版,并删除上面的内容,否则不会被回复
Describe the bug I want to modify some translation APIs, But I cannot correctly build
zotero-pf-translate.xpi
with commandsnpm run build
. There are 2 problems:main
branch. But it Cannot Install in Zotero.To Reproduce
In avoid of enviroment problem. All these trying work in Github Codespace. I'm trying to install plugins to the latest version I download in
https://www.zotero.org/download/
, which version tag isv6.0.27
For
Problem 1
, I tryed following:It seems build correctly, But Zotero show it's an incompatible version(Like following screenshot). I guess maybe the default build version is for Zotero 7?
For
Problem 2
; During my own usage, I have been using version v1.0.22, so I choose to make modifications on this version. I tryed following:there are some tsc build error like following:
Expected behavior Install and use Correctly.
Screenshots
Environment
Additional context Add any other context about the problem here.