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

Update onListening example in readme #71

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Update onListening example in readme #71

merged 1 commit into from
Feb 23, 2021

Conversation

victoria-miltcheva
Copy link

@victoria-miltcheva victoria-miltcheva commented Jan 8, 2021

I tried using the code in the onListening example, but was getting this error:

TypeError: server.getAddress is not a function
    at Object.onListening (<redacted>/rollup.config.js:45:32)
    at Server.<anonymous> (<redacted>/node_modules/rollup-plugin-serve/dist/index.cjs.js:85:74)
    at Object.onceWrapper (events.js:286:20)

After some troubleshooting, I noticed that server.getAddress() has been renamed to server.address(). Additionally, the host property of the returned object has been renamed to address. Making these changes allowed me to run the code successfully.

I wanted to update it here as well to save people some troubleshooting time 🙂.

@thgh thgh merged commit c82c8b1 into thgh:master Feb 23, 2021
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 this pull request may close these issues.

2 participants