Bug when namespacing a scaffold

I set up a new project today and when I tried namespacing my scaffolds (yarn rw g scaffold admin/posts) this error popped up.

Failed to compile.

./src/Routes.js 1:11
Module parse failed: Unexpected token (1:11)
File was processed with these loaders:
 * ../node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
> const Admin/EditPostPage = {
|   name: "Admin/EditPostPage",
|   loader: () => import("C:\\Users\\trist\\Code\\Hivemind\\web\\src\\pages\\Admin\\EditPostPage\\EditPostPage")

I used the exact data from the tutorial (admin/post) and the same schema so I could properly test it, and the bug was still there.

After removing the namespace the error went away. Thought I should bring this up incase it hasn’t been noticed yet.

1 Like

I can confirm I get the same error. I wonder if it’s a Windows thing.

Support for namespacing scaffolds was added here Add path specification to scaffolds by jtoar · Pull Request #423 · redwoodjs/redwood · GitHub

@dom you wrote that PR, can you please check if this is still working for you?