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

devcert is undefined. #63

Open
bantingGamer opened this issue Aug 6, 2020 · 2 comments
Open

devcert is undefined. #63

bantingGamer opened this issue Aug 6, 2020 · 2 comments

Comments

@bantingGamer
Copy link

just been trying to test the package but i get devcert undefined,

yarn add devcert

import devcert  from 'devcert';

let ssl = await devcert.certificateFor('my-app.test');

devcert is undefined

@Js-Brecht
Copy link
Contributor

Js-Brecht commented Aug 6, 2020

Devcert does not use default exports. If you wanted to use it like you are, you would need to import it into a namespace, like this:

import * as devcert from "devcert"

Otherwise, you can do it like this:

import { certificateFor } from "devcert"

@bantingGamer
Copy link
Author

Thank you for getting back to me.
I am going to try your suggestion as soon as possible.
rock on!

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

No branches or pull requests

2 participants