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

[Bug]: Cannot find module '.../node_modules/puppeteer-core/lib/esm/third_party/rxjs/rxjs' #11298

Closed
2 tasks
calixteman opened this issue Nov 2, 2023 · 2 comments · Fixed by #11299
Closed
2 tasks
Assignees

Comments

@calixteman
Copy link

calixteman commented Nov 2, 2023

Minimal, reproducible example

import puppeteer from "puppeteer";

const options = {
    product: "chrome",
    protocol: "webDriverBiDi",
    headless: false,
    defaultViewport: null,
    ignoreDefaultArgs: ["--disable-extensions"],
};

const browser = await puppeteer.launch(options);

and the package.json

{
  "name": "plop",
  "type": "module",
  "devDependencies": {
    "puppeteer": "^21.5.0"
  },
  "engines": {
    "node": ">=18"
  }
}

Error string

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/tmp/foo/node_modules/puppeteer-core/lib/esm/third_party/rxjs/rxjs' imported from /tmp/foo/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/lifecycle.js

Bug behavior

  • Flaky
  • PDF

Background

We want to use bidi protocol in pdf.js with puppeteer 21.5.0 and we got this error.
The above code is a minimal test case.

Expectation

To run without any errors.

Reality

An error.

Puppeteer configuration file (if used)

No response

Puppeteer version

21.5.0

Node version

18.15.0

Package manager

npm

Package manager version

9.5.0

Operating system

Windows

Copy link

github-actions bot commented Nov 2, 2023

This issue was not reproducible. Please check that your example runs locally and the following:

  • Ensure the script does not rely on dependencies outside of puppeteer and puppeteer-core.
  • Ensure the error string is just the error message.
    • Bad:

      Error: something went wrong
        at Object.<anonymous> (/Users/username/repository/script.js:2:1)
        at Module._compile (node:internal/modules/cjs/loader:1159:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
        at Module.load (node:internal/modules/cjs/loader:1037:32)
        at Module._load (node:internal/modules/cjs/loader:878:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        at node:internal/main/run_main_module:23:47
    • Good: Error: something went wrong.

  • Ensure your configuration file (if applicable) is valid.
  • If the issue is flaky (does not reproduce all the time), make sure 'Flaky' is checked.
  • If the issue is not expected to error, make sure to write 'no error'.

Once the above checks are satisfied, please edit your issue with the changes and we will
try to reproduce the bug again.


Analyzer run

@whimboo
Copy link
Collaborator

whimboo commented Nov 2, 2023

@Lightning00Blade can you please have a look? It seems that with 443ee99 not all issues with the rxjs import have been fixed.

This is a regression in the 21.5.0 release and everything was working fine with BiDi in 21.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants