doc(troubleshooting): add note about lack of node 8 support (#623)

This commit is contained in:
Joel Einbinder 2020-01-24 09:04:54 -08:00 committed by GitHub
parent 03f37bcbe2
commit ff877014cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -12,6 +12,7 @@
* [Running Playwright in Docker](#running-playwright-in-docker) * [Running Playwright in Docker](#running-playwright-in-docker)
- [Tips](#tips) - [Tips](#tips)
- [Code Transpilation Issues](#code-transpilation-issues) - [Code Transpilation Issues](#code-transpilation-issues)
- [ReferenceError: URL is not defined](#referenceerror-url-is-not-defined)
<!-- GEN:stop --> <!-- GEN:stop -->
## Chromium ## Chromium
@ -288,6 +289,10 @@ await page.evaluate(`(async() => {
})()`); })()`);
``` ```
## ReferenceError: URL is not defined
Playwright requires node 10 or higher. Node 8 is not supported, and will cause you to recieve this error.
# Please file an issue # Please file an issue
Playwright is a new project, and we are watching the issues very closely. As we solve common issues, this document will grow to include the common answers. Playwright is a new project, and we are watching the issues very closely. As we solve common issues, this document will grow to include the common answers.

View file

@ -30,7 +30,7 @@ function checkSources(sources, externalDependencies) {
const classEvents = new Map(); const classEvents = new Map();
const eventsSources = sources.filter(source => source.name().startsWith('events.ts')); const eventsSources = sources.filter(source => source.name().startsWith('events.ts'));
for (const eventsSource of eventsSources) { for (const eventsSource of eventsSources) {
const {Events} = require(eventsSource.filePath().endsWith('.js') ? eventsSource.filePath() : eventsSource.filePath().replace('/src/', '/lib/').replace('.ts', '.js')); const {Events} = require(eventsSource.filePath().endsWith('.js') ? eventsSource.filePath() : eventsSource.filePath().replace(/\bsrc\b/, 'lib').replace('.ts', '.js'));
for (const [className, events] of Object.entries(Events)) for (const [className, events] of Object.entries(Events))
classEvents.set(className, Array.from(Object.values(events)).filter(e => typeof e === 'string').map(e => Documentation.Member.createEvent(e))); classEvents.set(className, Array.from(Object.values(events)).filter(e => typeof e === 'string').map(e => Documentation.Member.createEvent(e)));
} }