Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to execute cli command for npm:web-ext #16852

Closed
fuji44 opened this issue Nov 28, 2022 · 0 comments · Fixed by #23088
Closed

Failure to execute cli command for npm:web-ext #16852

fuji44 opened this issue Nov 28, 2022 · 0 comments · Fixed by #23088
Assignees
Labels
bug Something isn't working correctly node API polyfill Related to various "node:*" modules APIs node compat

Comments

@fuji44
Copy link

fuji44 commented Nov 28, 2022

web-ext is a CLI tool for developing web-extensions created in node.js.

Since npm is now supported by deno, I tried to see if I could run it with deno, but had problems in some cases.

1. Unable to read CommonJS format configuration files

I haven't looked into it in depth, but for some reason the polyfill is not working?

> deno run -A npm:web-ext@7.4.0 run -s dist
Error 'could not find npm package for 'file:///C:/Users/fuji44/git/dlsite-enhancer/web-ext-config.js'' contains boxed error of unknown type:
  "could not find npm package for 'file:///C:/Users/fuji44/git/dlsite-enhancer/web-ext-config.js'"

UsageError: Cannot read config file: C:\Users\fuji44\git\dlsite-enhancer\web-ext-config.js
Error: could not find npm package for 'file:///C:/Users/fuji44/git/dlsite-enhancer/web-ext-config.js'

2. Error: Not implemented: domain.create

I know the Node.js domain is deprecated, but does Deno plan to implement it in the future?
I can understand the decision not to implement, but I would like to know the plan.

--no-config-discovery is specified to avoid the aforementioned problem.

> deno run -A npm:web-ext@7.4.0 run -s dist --no-config-discovery
Running web extension from C:\Users\fuji44\git\dlsite-enhancer\dist
Use --verbose or --devtools to see logging
Error: Not implemented: domain.create
    at notImplemented (https://deno.land/std@0.166.0/node/_utils.ts:23:9)
    at Object.create (https://deno.land/std@0.166.0/node/domain.ts:7:3)
    at file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/rdp-client.js:70:24
    at new Promise (<anonymous>)
    at FirefoxRDPClient.connect (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/rdp-client.js:65:12)
    at connectToFirefox (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/rdp-client.js:51:17)
    at connect (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/remote.js:139:24)
    at establishConnection (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/remote.js:159:22)
    at connectWithMaxRetries (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/remote.js:178:10)
    at FirefoxDesktopExtensionRunner.startFirefoxInstance (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/extension-runners/firefox-desktop.js:211:56)

Error: Not implemented: domain.create
    at notImplemented (https://deno.land/std@0.166.0/node/_utils.ts:23:9)
    at Object.create (https://deno.land/std@0.166.0/node/domain.ts:7:3)
    at file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/rdp-client.js:70:24
    at new Promise (<anonymous>)
    at FirefoxRDPClient.connect (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/rdp-client.js:65:12)
    at connectToFirefox (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/rdp-client.js:51:17)
    at connect (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/remote.js:139:24)
    at establishConnection (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/remote.js:159:22)
    at connectWithMaxRetries (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/firefox/remote.js:178:10)
    at FirefoxDesktopExtensionRunner.startFirefoxInstance (file:///C:/Users/fuji44/AppData/Local/deno/npm/registry.npmjs.org/web-ext/7.4.0/lib/extension-runners/firefox-desktop.js:211:56)
@dsherret dsherret added bug Something isn't working correctly node compat labels Nov 28, 2022
@bartlomieju bartlomieju added the node API polyfill Related to various "node:*" modules APIs label Mar 4, 2024
@bartlomieju bartlomieju self-assigned this Mar 26, 2024
bartlomieju added a commit that referenced this issue Apr 3, 2024
Closes #16852

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
satyarohith pushed a commit that referenced this issue Apr 11, 2024
Closes #16852

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node API polyfill Related to various "node:*" modules APIs node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants