# All links fetching as turbo stream

**URL:** <https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840>\
**Category:** General\
**Created:** [January 2, 2021, 5:09pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840 "2021-01-02T17:09:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 2, 2021, 5:09pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/1 "2021-01-02T17:09:21Z")

</div>

I am migrating an app I started with the react template to Hotwire. I do not currently use any react components but any time I click a link in my app it requests it as TURBO\_STREAM and does not change the page content. Should I be using Turbo and Stimulus through webpacker instead of gems?

---

<div class="post-metadata">

**Author:** ![jonathanbruno](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/jonathanbruno/32/1215_2.png) [@jonathanbruno](https://discuss.hotwired.dev/u/jonathanbruno)\
**Post date:** [January 2, 2021, 5:32pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/2 "2021-01-02T17:32:22Z")

</div>

Any js errors on browser console? Afaik, your requests will always be turbo\_stream, but will be deferred to html whenever you don’t handle it specifically for turbo\_stream…  
Of you’re using webpack take a look at de docs, it describes how to add the libraries with yarn/npm.

---

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 2, 2021, 5:33pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/3 "2021-01-02T17:33:56Z")

</div>

No javascript errors, just warnings about deferred loading. I will see if using the webpack method changes anything.

Edit: Nope, no change and no errors or warnings in the console.

---

<div class="post-metadata">

**Author:** ![jonathanbruno](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/jonathanbruno/32/1215_2.png) [@jonathanbruno](https://discuss.hotwired.dev/u/jonathanbruno)\
**Post date:** [January 3, 2021, 2:49am UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/4 "2021-01-03T02:49:17Z")

</div>

Can you place you GitHub repo , so that we can take a look?

---

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 6, 2021, 11:56pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/6 "2021-01-06T23:56:57Z")

</div>

Not yet. Here is a minimal repo showing an example of the issue: [GitHub - coder2000/hotwire\_test](https://github.com/coder2000/hotwire_test)

---

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 7, 2021, 3:03am UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/7 "2021-01-07T03:03:33Z")

</div>

So one thing you will notice is that if you remove the turbo-frame it will start working. In my code, I have a partial page being rendered like in the video and that page doesn’t load but others that do not have turbo-frames do.

---

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 10, 2021, 7:51pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/8 "2021-01-10T19:51:19Z")

</div>

Still having issues, I can get the pages to load if I refresh and they are processed as HTML but anything processed as TURBO\_STREAM does not cause any content to be visible. @jonathanbruno

---

<div class="post-metadata">

**Author:** ![jonathanbruno](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/jonathanbruno/32/1215_2.png) [@jonathanbruno](https://discuss.hotwired.dev/u/jonathanbruno)\
**Post date:** [January 10, 2021, 8:20pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/9 "2021-01-10T20:20:24Z")

</div>

You have only one turbo frame tag, main …in the layout. I’m not sure it would work.  
When using the turbo frame tag it ignores the layout… thus it is ignoring the tag which should exist in the response

---

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 10, 2021, 8:22pm UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/10 "2021-01-10T20:22:01Z")

</div>

Yeah, I guessed. When you remove that it works. However, in my actual codebase it still doesn’t.

---

<div class="post-metadata">

**Author:** ![coder2000](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/coder2000/32/1335_2.png) [@coder2000](https://discuss.hotwired.dev/u/coder2000)\
**Post date:** [January 11, 2021, 1:57am UTC](https://discuss.hotwired.dev/t/all-links-fetching-as-turbo-stream/1840/11 "2021-01-11T01:57:13Z")

</div>

Ok, so I got it working. It doesn’t like having the gem installed with the npm package. I wasn’t sure how to get it working with webpacker otherwise. I lose access to the helper but can either make my own or copy it into my own helpers.

Edit: Actually, if I read things properly you can use both webpacker and hotwire, I just screwed up the install by having a haml template instead of ERB so it didn’t install the correct javascript. I will go back and fix my code.
