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] Types don't work in WebStorm ("Unresolved function or method") #2268

Closed
davidgilbertson opened this issue May 16, 2020 · 1 comment · Fixed by #2318
Closed

[BUG] Types don't work in WebStorm ("Unresolved function or method") #2268

davidgilbertson opened this issue May 16, 2020 · 1 comment · Fixed by #2318
Assignees

Comments

@davidgilbertson
Copy link
Contributor

Context:

  • Playwright Version: 1.0.2
  • IDE: WebStorm 2020.1

This isn't really a bug in Playwright, but the TypeScript types aren't picked up in WebStorm because they're in a different package (playwright-core).

image

Although it's not the 'fault' of Playwright, I've never seen any other package do this, so Playwright will be one of the few packages where types don't work for WebStorm users.

I've logged this as an issue with JetBrains: https://youtrack.jetbrains.com/issue/WEB-45571, but it's not considered a bug so isn't going to change.

For WebStorm users finding this, the workaround is to either add playwright-core to your package.json or mark node_modules/playwright-core as 'Not excluded' in the IDE:
image

Then all is well:
image

If this could be resolved that'd be great, but otherwise maybe note this in the getting started?

@aslushnikov aslushnikov self-assigned this May 20, 2020
aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 20, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes microsoft#2268
aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 20, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes microsoft#2268
aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 20, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes microsoft#2268
aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 20, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes microsoft#2268
aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 21, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes microsoft#2268
aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 21, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes microsoft#2268
aslushnikov added a commit that referenced this issue May 21, 2020
This patch:
- drops dependency on playwright-core in all our packages. Instead of
  the dependency, packages are now built with `//packages/build_package.sh`
  script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
  that is used to manage browser revisions.

This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.

We'll unify all our package management scripts under `//packages/` in a
follow-up.

Fixes #2268
@davidgilbertson
Copy link
Contributor Author

Great stuff @aslushnikov!

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

Successfully merging a pull request may close this issue.

2 participants