<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: adityanugroho09</title>
    <description>The latest articles on DEV Community by adityanugroho09 (@adityanugroho09).</description>
    <link>https://dev.to/adityanugroho09</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F890022%2F209e2710-b7c8-4f09-9fb1-524c7c1d71d6.png</url>
      <title>DEV Community: adityanugroho09</title>
      <link>https://dev.to/adityanugroho09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adityanugroho09"/>
    <language>en</language>
    <item>
      <title>Error: Missing helper: "handlebars": Missing helper: "handlebars". Any thought ?</title>
      <dc:creator>adityanugroho09</dc:creator>
      <pubDate>Mon, 11 Jul 2022 00:44:55 +0000</pubDate>
      <link>https://dev.to/adityanugroho09/error-missing-helper-handlebars-missing-helper-handlebars-any-thought--37h</link>
      <guid>https://dev.to/adityanugroho09/error-missing-helper-handlebars-missing-helper-handlebars-any-thought--37h</guid>
      <description>&lt;p&gt;📁 server.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Hapi = require('@hapi/hapi');
const Inert = require('@hapi/inert');
const Vision = require('@hapi/vision');
const Handlebars = require('handlebars');
const path = require('path');
const routes = require('./routes');

const init = async () =&amp;gt; {

  // BUILD SERVER
  const server = Hapi.Server({
    host: 'localhost',
    port: 1234,
    routes: {
      files: {
        relativeTo: path.join(__dirname, 'static'),
      },
    },
  });

  // PLUGIN CONFIGURATION
  await server.register([
    {
      plugin: require('hapi-geo-locate'),
      options: {
      // to able track the user ip
        enabledByDefault: true,
      },
    },
    {
      plugin: Inert,
    },
    {
      plugin: Vision,
    },
  ]);

  // MAKE HANDLEBARS AVAILABLE
  server.views({
    engines: {
      html: Handlebars,
    },
    path: path.join(__dirname, 'views'),
  });

  // ROUTE
  server.route(routes);

  // SERVER CONFIGURATION
  await server.start();
};

init();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📁 routes.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const {servingDynmaicPage} = require('./handler');
const routes = [
{
  method: 'GET',
  path: '/dynamicPage',
  handler: servingDynmaicPage,
},];

module.exports = routes;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📁 handler.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const servingDynmaicPage = (request, h) =&amp;gt; {
  const data = {name: 'Adit'};
  return h.view('index', data);
};

module.exports = {servingDynmaicPage};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;why i get an error like this =&amp;gt; Error: Missing helper: "handlebars": Missing helper: "handlebars". Any thought ?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>help</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
