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

App doesn't load: Cannot read 'path' property of undefined #5

Open
1papaya opened this issue Nov 8, 2017 · 0 comments
Open

App doesn't load: Cannot read 'path' property of undefined #5

1papaya opened this issue Nov 8, 2017 · 0 comments

Comments

@1papaya
Copy link

1papaya commented Nov 8, 2017

Steps taken:

After executing yarn run serve it throws an error (below) and the site at localhost:3000 doesn't load.

Metalsmith error: { TypeError: /home/user/proj/ram/ram/app/layouts/post.html:20
    18|             </a>
    19|           </div>
 >> 20|           <%- include('../includes/navigation') %>
    21|         </div>
    22|       </header>
    23| 

/home/user/proj/ram/ram/app/includes/navigation.ejs:11
    9|     <section class="ppn__section">
    10|       <h3 class="ppn__section-title"><%= site.sectionsMeta[k] %></h3>
 >> 11|       <%- include('../includes/nav-item', {children: sections[k].children}) %>
    12|     </section>
    13|     <% }) %>
    14| 

/home/user/proj/ram/ram/app/includes/nav-item.ejs:16
    14|       <% var activeClass = children[k].item.path === path ? 'ppn__menu-item--active' : '' %>
    15|       <a href="<%- site.baseurl %>/<%= children[k].item.path %>" title="Go to page" class="ppn__menu-item <%- activeClass %>"><%= children[k].item.title %></a>
 >> 16|       <%- include('nav-item', {children: children[k].children || []}) %>
    17|   </li>
    18|   <% }) %>
    19| </ul>

/home/user/proj/ram/ram/app/includes/nav-item.ejs:14
    12|   <% keys.forEach(function(k) { %>
    13|   <li>
 >> 14|       <% var activeClass = children[k].item.path === path ? 'ppn__menu-item--active' : '' %>
    15|       <a href="<%- site.baseurl %>/<%= children[k].item.path %>" title="Go to page" class="ppn__menu-item <%- activeClass %>"><%= children[k].item.title %></a>
    16|       <%- include('nav-item', {children: children[k].children || []}) %>
    17|   </li>

Cannot read property 'path' of undefined
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:27:42)
    at Array.forEach (native)
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:24:13)
    at returnedFn (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:555:17)
    at include (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:553:39)
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:39:17)
    at Array.forEach (native)
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:24:13)
    at returnedFn (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:555:17)
    at include (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:553:39)
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:23:17)
    at Array.forEach (native)
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:17:16)
    at returnedFn (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:555:17)
    at include (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:553:39)
    at eval (eval at compile (/home/user/proj/ram/ram/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:29:17) path: '/home/user/proj/ram/ram/app/layouts/post.html' }
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

1 participant