alleyinteractive / alley-scripts

A collection of scripts and utilities for Alley projects.
https://alley-scripts.alley.dev/
6 stars 1 forks source link

Feature Scaffolder Error: Missing psrClassFilename Helper #600

Closed kevinfodness closed 8 months ago

kevinfodness commented 8 months ago

Description of the bug

When attempting to use the Scaffolder package to create a new feature in my plugin based on create-wordpress-plugin, I encountered the following error:

/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js:19
      throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
            ^
Error: Missing helper: "psrClassFilename"
    at Object.<anonymous> (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js:19:13)
    at Object.wrapper (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)
    at Object.eval [as main] (eval at createFunctionContext (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:11:165)
    at main (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32)
    at ret (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12)
    at ret (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:519:21)
    at parseExpression (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/@alleyinteractive/scaffolder/dist/expressions/expressions.js:32:57)
    at /Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/@alleyinteractive/scaffolder/dist/generators/file.js:44:82
    at Array.map (<anonymous>)
    at FileGenerator.collectFeatureSourceFiles (/Users/kevinfodness/.npm/_npx/01e508643f226d01/node_modules/@alleyinteractive/scaffolder/dist/generators/file.js:40:6) {
  description: undefined,
  fileName: undefined,
  lineNumber: undefined,
  endLineNumber: undefined,
  number: undefined
}

Node.js v20.11.1

I do have a .scaffolder/plugin-feature directory in my plugin, and I ran the command from the root of the plugin folder.

Steps To Reproduce

  1. Create new plugin based off of create-wordpress-plugin
  2. Open a terminal and change directory to the plugin's folder
  3. Run npx @alleyinteractive/scaffolder@latest
  4. Select plugin feature from the list of options
  5. Observe error

Additional Information

No response