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

Compatible issue with node@10.13 - node@10.17 #6548

Closed
Brooooooklyn opened this issue Oct 26, 2020 · 2 comments · Fixed by #6550
Closed

Compatible issue with node@10.13 - node@10.17 #6548

Brooooooklyn opened this issue Oct 26, 2020 · 2 comments · Fixed by #6550
Assignees

Comments

@Brooooooklyn
Copy link

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 5.4.0
  • Platform / OS version: `macOS 10.15.17
  • URLs (if applicable):
  • Node.js version: 10.15.0

fs.promises is experimental in node@10.13 ~ node@10.17, so the result of Object.getOwnPropertyDescriptor(require('fs'), 'promises').enumerable is false, which means https://github.com/puppeteer/puppeteer/blob/main/src/common/helper.ts#L322 this line would throw Can not read property open from undefined

@mathiasbynens
Copy link
Member

Jack, this is related to the agnostification work. Could you PTAL?

@jackfranklin
Copy link
Collaborator

Ah, this is unfortunate. Our CI does run on 10.X but it runs on 10.19 so we managed to circumvent this problem.

I guess we can introduce a helper whilst we have to support <10.19 to ensure we get the import from the right place, #6549 looks like a good start, thanks!

jackfranklin added a commit that referenced this issue Oct 26, 2020
We saw in #6548 that the
`fs.promises` module was experimental in Node <10.17 and as such we
introduced issues for users on 10.15.

Until we can drop Node v10 (it's EOL is 30-04-20201
https://github.com/nodejs/Release#release-schedule) we should run our
tests on an old Node 10 to avoid regressing in this area.
jackfranklin added a commit that referenced this issue Oct 26, 2020
* chore: run unit tests on node 10.15

We saw in #6548 that the
`fs.promises` module was experimental in Node <10.17 and as such we
introduced issues for users on 10.15.

Until we can drop Node v10 (it's EOL is 30-04-20201
https://github.com/nodejs/Release#release-schedule) we should run our
tests on an old Node 10 to avoid regressing in this area.

* chore: helper for importing fs safely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants