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

reply.file - TypeError: Uncaught error: undefined is not a function #2729

Closed
jonathanKingston opened this issue Aug 22, 2015 · 8 comments
Closed
Assignees
Labels
non issue Issue is not a problem or requires changes

Comments

@jonathanKingston
Copy link

When using:

  handler: function (request, reply) {
    reply.file('index.html');
  }

As suggested here: http://hapijs.com/tutorials/serving-files

I get:

    TypeError: Uncaught error: undefined is not a function
    at server.route.handler ...

Seems related to other changes of code like: #2706

@jonathanKingston
Copy link
Author

Adding in https://github.com/hapijs/inert fixed this. Is this now a requirement?

If so the issue here is just documentation.

@hueniverse
Copy link
Contributor

The tutorials are not up to date for version 9.x. This change is clearly documented in the 9.x release notes.

@hueniverse hueniverse added the non issue Issue is not a problem or requires changes label Aug 22, 2015
@hueniverse hueniverse self-assigned this Aug 22, 2015
@jonathanKingston
Copy link
Author

@hueniverse can I suggest the docs have a warning pointing that out then? It seems pretty bad user experience to come to a new library and expect them to read the release notes before the tutorials.

@hueniverse
Copy link
Contributor

It's a large community project with different parts maintained by different people. Some are on vacation. Tutorials should have the version number on them (open issue) but it's a new release and it takes time. It's all open source by volunteers.

@MattiSG
Copy link

MattiSG commented Aug 24, 2015

+1

For other people who got stuck at this, the release notes are at #2682.

@ohabash
Copy link

ohabash commented Feb 16, 2018

How can I learn hapi if the docs wont even work for me.

@WesTyler
Copy link
Contributor

The docs on the repo are kept up to date. It is extra tutorials that take time for volunteers to update in their free time.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
non issue Issue is not a problem or requires changes
Projects
None yet
Development

No branches or pull requests

5 participants