-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Chrome-launcher typescript compiler, can't find name #2497
Comments
for typescript consumption do the following import {launch, LaunchedChrome} from 'chrome-launcher';
let launched: LaunchedChrome;
launched = await launch();
// or even simpler
import {launch} from 'chrome-launcher';
const launched = await launch(); |
Thanks for looking into this @samccone, i've tried your suggestion but I still get the message:
Here is the travis build: https://travis-ci.org/paulirish/pwmetrics/builds/242740991 I noticed that chrome-launcher is exported as a standard javascript project, and that it doesn't have a explicit types files, could either of these be the cause of the problems? Or can I not use the chrome-launcher types in pwmetrics? |
|
Would renaming chrome-launcher.ts to index.ts and changing the package.json[main] property accordingly make this work? The nested import seems counter intuitive. |
I will investigate how we can better handle this. |
May I suggest trying to rename the chrome-launcher files to index and changing accordingly in the package.json? |
The primary consumption point of this module is going to be javascript so we can not change that bit, however renaming to index.ts might end up fixing the problem as well. ~~ investigation needed ~~ |
Going to close this issue as working as intended. we can follow up with investigation around easier typescript requires. |
the #2513 fix is shipped in [email protected] |
After adding chrome-launcher as a module to the pwmetrics project I came across this typescript issue:
The respective code is:
If I add the project as a js module (not in the docs I know) I get the following:
I import the module as:
System details:
Ubuntu 16.04 LTS
Node: V8.0.0
NPM: V5.0.0
How to reproduce:
Trying to merge LH.v2 to pwmetrics and add the chrome-launcher dependency :)
Thanks for the time.
The text was updated successfully, but these errors were encountered: