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

Scaffolding tool missing templates #9

Closed
kderbalah opened this issue May 10, 2019 · 2 comments
Closed

Scaffolding tool missing templates #9

kderbalah opened this issue May 10, 2019 · 2 comments

Comments

@kderbalah
Copy link

I got an error while using the CLI command to scaffold a new page alongside a new reducer and style file.
The script failed to resolve some required mustache templates,

  • templates/reducers/action-index.mustache
  • templates/interfaces/redux-import.d.mustache
npm run cli

> next-boilerplate@1.0.0 cli [..omitted]/next-boilerplate
> node ./project-cli/dist/index.js a
  ____             _             _
 |  _ \ __ _ _ __ | | _____   __| |
 | |_) / _` | '_ \| |/ / _ \ / _` |
 |  __/ (_| | | | |   < (_) | (_| |
 |_|   \__,_|_| |_|_|\_\___/ \__,_|

? What do you want to add? page
? Enter page name about
? Do you want to add custom route or use default route name? No, use default.
? Do you want to have a connection to store? Yes
? Do you want to create a new reducer or use your own? Yes, I want to have new reducer.
? Do you want to add a style file? Yes
✔ Added new class component
✔ Added new interface file
✔ Interface file added to Interfaces/index.ts
✔ Interface file added to Interfaces/Redux/Store.d.ts
✔ Added new reducer file
✔ Reducer added to Redux/Reducers/index.ts
✔ Reducer file added combineReducers in Redux/Reducers/index.ts
✔ Action constants added to Definations/ActionConsts.ts
(node:6134) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '[..omitted]/next-boilerplate/project-cli/helper_scripts/templates/reducers/action-index.mustache'
    at Object.openSync (fs.js:448:3)
    at Object.readFileSync (fs.js:348:35)
    at Object.getTemplate ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:41:71)
    at Object.getFileContent ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:160:50)
    at Object.addIndex ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:55:67)
    at Object.addAction ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:163:24)
    at Object.createClassComponent ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:218:28)
    at Object.<anonymous> ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/page-component.js:86:25)
    at Generator.next (<anonymous>)
    at fulfilled ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/page-component.js:4:58)
(node:6134) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6134) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
fs.js:119
    throw err;
    ^

Error: ENOENT: no such file or directory, open '[..omitted]/next-boilerplate/project-cli/helper_scripts/templates/interfaces/redux-import.d.mustache'
    at Object.openSync (fs.js:448:3)
    at Object.readFileSync (fs.js:348:35)
    at Object.getTemplate ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:41:71)
    at Object.getFileContent ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:98:58)
    at Object.replaceContent ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:119:81)
    at Timeout.setTimeout [as _onTimeout] ([..omitted]/next-boilerplate/project-cli/dist/helper_scripts/definations/helper.js:102:32)
    at listOnTimeout (internal/timers.js:535:17)
    at processTimers (internal/timers.js:479:7)
@omeraplak
Copy link
Collaborator

Hi @kderbalah,
Thanks for reaching us. We’re gonna investigate it. And we’ll update it soon. Feel free to contact us if you need anything.

@omeraplak
Copy link
Collaborator

Hi @kderbalah ,
We’ve added missing templates. It’s ready to use on master branch. Please do not hesitate to contact us if you need any further information.

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

2 participants