1602 / 1602/compound

TypeError when implementing namespace

Open
#564 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
179
PR merge metrics
No merged PRs in 30d

Description

It would be awesome to be able to `compound g crud "admin/posts" stuff`. Since #93 is closed I assumed it was implemented, but apparently it's not.

When I try to implement a namespace manually, after running `compound g crud post title content` and moving post controllers and views to admin/posts, I get the following error:

> TypeError: /Users/andreashultgren/Documents/Projects/Private/compound-test/app/views/admin/posts/index.ejs:3 1|

5| 6|

Contributor guide

No contributing guide indexed for this repository

Research direction

The error occurs in app/views/admin/posts/index.ejs where pathTo.posts() is called. Check how routes are defined with map.namespace in routes.js and how pathTo helpers are generated. Look for existing route helper generation code, possibly in lib/compound or lib/compound/helpers. Verify if namespace routes create helpers like pathTo.adminPosts(). Run the app to reproduce the error and see what helpers are available in the view context.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.