ndelvalle/generator-api

Trying to scaffold via Yo leads to exception

levmixali4 opened this issue · 1 comments

? Server name: apiYotest
? Server description: trying yo to see nodejs api with mongo
? Server version: 0.1.0
? Author name: Myk
? Author email:
? Business models: (singular and comma separated) user, pet
? what should the database be named? api-yotest

result:

events.js:141
      throw er; // Unhandled 'error' event
      ^
AssertionError: Trying to copy from a source that does not exist: /usr/local/lib/node_modules/generator-api/generators/app/templates/.gitignore
    at EditionInterface.exports._copySingle (/usr/local/lib/node_modules/generator-api/node_modules/mem-fs-editor/lib/actions/copy.js:45:3)
    at EditionInterface.exports.copy (/usr/local/lib/node_modules/generator-api/node_modules/mem-fs-editor/lib/actions/copy.js:23:17)
    at gitignore (/usr/local/lib/node_modules/generator-api/generators/app/index.js:131:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/generator-api/node_modules/yeoman-generator/lib/base.js:431:23)
    at /usr/local/lib/node_modules/generator-api/node_modules/run-async/index.js:26:25
    at /usr/local/lib/node_modules/generator-api/node_modules/run-async/index.js:25:19
    at /usr/local/lib/node_modules/generator-api/node_modules/yeoman-generator/lib/base.js:432:9
    at processImmediate [as _immediateCallback] (timers.js:383:17)

Hey @levmixali4 thanks for reporting the issue. This #2 should have fix it. Remember running the project with node version >=6.3 because it's using es6 features without babel.
If you have a different node version check out this package to manage multiple versions.