【发布时间】:2017-01-17 09:21:57
【问题描述】:
我正在将 Chrome 扩展程序移植到 Firefox WebExtensions。在 Chrome 上一切正常。
我在 Firefox 上试过这些:
1.修改我的扩展使其与Firefox WebExtensions兼容,然后通过Load Temporary Add-on将其加载到Firefox中,一切正常
2. 通过npm install -g web-ext 安装web-ext 模块。然后我运行web-ext run,Firefox 成功启动并安装了我的扩展
3.运行web-ext build,然后在Firefox上安装打包的扩展,一切正常
D:\temp>web-ext build
Building web extension from D:\temp
Your web extension is ready: D:\temp\web-ext-artifacts\my_extension-1.0.zip
4. 然后我运行web-ext sign --api-key=MyApiKey --api-secret=MyApiSecret,它失败并出现错误:
D:\temp>web-ext sign --api-key=MyApiKey --api-secret=MyApiSecret
Building web extension from D:\temp
sign: Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\abc\AppData\Local\Temp\tmp-web-ext-628J9dJMBi0bWRX'
at Error (native)
at Object.fs.rmdirSync (fs.js:806:18)
at _rmdirRecursiveSync (C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\node_modules\tmp\lib\tmp.js:284:10)
at TempDir._cleanupCallback [as _removeTempDir] (C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\node_modules\tmp\lib\tmp.js:408:5)
at TempDir.remove (C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\dist\webpack:\src\util\temp-dir.js:9:4939)
at C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\dist\webpack:\src\util\temp-dir.js:9:3976
at process._tickCallback (node.js:401:9)
sign: Error code: ENOTEMPTY
我进入C:\Users\abc\AppData\Local\Temp\tmp-web-ext-628J9dJMBi0bWRX,实际上它是空的。有人知道为什么会这样吗?
我的 api key 和 api secret 用于旧的 Firefox JSCTypes 附加组件。这就是我不断收到此错误的原因吗?
【问题讨论】:
标签: firefox-addon-webextensions