kittn / generator-kittn

The Yeoman Kittn Generator
http://kittn.de
MIT License
61 stars 5 forks source link

Can't run with default settings #118

Closed joshkpeterson closed 6 years ago

joshkpeterson commented 6 years ago

Getting the following errors when I run yo kittn and choose all default settings.

I have tried reinstalling node.

SyntaxError: Unexpected token else in /Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/generators/app/templates/gulpfile/tasks/build.js while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint: https://github.com/RyanZim/EJS-Lint at new Function () at Template.compile (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/ejs/lib/ejs.js:592:12) at Object.compile (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/ejs/lib/ejs.js:388:16) at handleCache (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/ejs/lib/ejs.js:212:18) at Object.exports.render (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/ejs/lib/ejs.js:414:10) at render (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/mem-fs-editor/lib/actions/copy-tpl.js:12:16) at process (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/mem-fs-editor/lib/actions/copy-tpl.js:26:14) at applyProcessingFunc (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/mem-fs-editor/lib/actions/copy.js:13:16) at EditionInterface.exports._copySingle (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/mem-fs-editor/lib/actions/copy.js:63:16) at files.forEach.file (/Users/joshy/.nvm/versions/node/v10.0.0/lib/node_modules/generator-kittn/node_modules/mem-fs-editor/lib/actions/copy.js:50:10)

And then afterward if I do npm run init I get:

[02:14:57] Requiring external module @babel/register /Users/joshy/projects/kittn-5/gulpfile/tasks/browsersync.js:5 import kc from '../../config.json'; ^^

SyntaxError: Unexpected identifier at new Script (vm.js:74:7) at createScript (vm.js:246:10) at Object.runInThisContext (vm.js:298:10) at Module._compile (internal/modules/cjs/loader.js:646:28) at Module._compile (/Users/joshy/projects/kittn-5/node_modules/pirates/lib/index.js:91:24) at Module._extensions..js (internal/modules/cjs/loader.js:689:10) at Object.newLoader [as .js] (/Users/joshy/projects/kittn-5/node_modules/pirates/lib/index.js:96:7) at Module.load (internal/modules/cjs/loader.js:589:32) at tryModuleLoad (internal/modules/cjs/loader.js:528:12) at Function.Module._load (internal/modules/cjs/loader.js:520:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! kittn5@0.0.1 init: cross-env NODE_ENV=production gulp init --env=init && cross-env NODE_ENV=production npm run subtask:bundlewebpack npm ERR! Exit status 1

DotCoyote commented 6 years ago

We haven't tested jet for Node v10... Will be the next step! ;)

DotCoyote commented 6 years ago

OK, this doesn't seem to be a Node 10 problem, since I can't reproduce this error in v10... But... https://github.com/kittn/generator-kittn/blob/master/generators/app/templates/gulpfile/tasks/build.js#L26 seems to be the first problem (will be solved with the next release).

The second error could be inherited by the first one, since yo aborts the copy-file-task, when there occures an error. So there could be some files missing... I'll make a release today, please upgrade kittn afterwards.

joshkpeterson commented 6 years ago

Awesome, thanks. Just reproduced in v8.11.1 fyi.

DotCoyote commented 6 years ago

The install itself runs perfectly in v10, but gulp throws really ugly errors... Will be another issue...