【问题标题】:Cannot run addon after installation of web-ext on ubuntu 16.04 nodejs v4.2.6 npm 3.5.2在 ubuntu 16.04 nodejs v4.2.6 npm 3.5.2 上安装 web-ext 后无法运行插件
【发布时间】:2019-03-28 02:03:30
【问题描述】:

在安装 web-ext 时,我在安装时收到了这两条消息:

npm WARN optional Skipping failed optional dependency /web-ext/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4

在尝试使用web-ext run 启动插件后,我收到了这条消息

TypeError:无法读取未定义的属性“R_OK” 在 fileIsReadable (/usr/local/lib/node_modules/web-ext/dist/webpack:/src/util/file-exists.js:24:42) 在 _callee$ (/usr/local/lib/node_modules/web-ext/dist/webpack:/src/util/file-exists.js:28:11) 在 tryCatch (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:62:40) 在 GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:296:22) 在 GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:114:21) 在步骤(/usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:1) 在 /usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:1 在新的 Promise (/usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/core-js/library/modules/es6.promise.js:177:1) 在 /usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:1 在 fileExists (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:13002:17)

【问题讨论】:

  • 请添加您的 nodejs 和 npm 版本。也许你必须升级或降级。
  • nodejs v4.2.6 npm 3.5.2 谢谢!
  • 请尝试至少更新到最新的 v6 节点。我建议你使用 >= v8,因为对 v6 的支持在 2019 年结束,你不能使用 async/await。 (github.com/nodejs/Release#release-schedule)
  • 在 curl -sL deb.nodesource.com/setup_10.x | 之后sudo -E bash - sudo apt-get install -y nodejs 一切正常。谢谢菲尔!
  • 很高兴听到 ;)

标签: firefox firefox-addon web-ext


【解决方案1】:

至少更新到最新的 v6 节点。我建议您使用 >= v8,因为对 v6 的支持将在 2019 年结束,例如您不能使用 async/await。 (https://github.com/nodejs/Release#release-schedule)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-27
    • 2018-04-03
    • 2021-12-28
    • 2023-04-10
    • 2018-06-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多