feathersjs-ecosystem / cli

The command line interface for scaffolding Feathers applications

Home Page:https://github.com/feathersjs/feathers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`feathers generate app` fails to generate the project with an AssertionError

tylermmorton opened this issue · comments

commented

Steps to reproduce

$ feathers generate app
? Project name test
? Description this is a test
? What folder should the source files live in? src
? Which package manager are you using (has to be installed globally)? npm
? What type of API are you making? (Press <space> to select, <a> to toggle all, <i> to invert selection)REST, Realtime via Socket.io
? Which testing framework do you prefer? Jest

Whenever running feathers generate app I get an AssertionError and it fails to generate the project.

Expected behavior

feathersjs/cli should be able to generate the app.

Actual behavior

Error output:

events.js:174
      throw er; // Unhandled 'error' event
      ^

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\generator-feathers\generators\app\templates\static
    at EditionInterface.exports.copy (C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\mem-fs-editor\lib\actions\copy.js:48:3)
    at AppGenerator.writing (C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\generator-feathers\generators\app\index.js:127:13)
    at Object.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\yeoman-generator\lib\index.js:424:27)
    at C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\run-async\index.js:25:25
    at new Promise (<anonymous>)
    at C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\run-async\index.js:24:19
    at self.env.runLoop.add.completed (C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\yeoman-generator\lib\index.js:425:13)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
Emitted 'error' event at:
    at Immediate.setImmediate (C:\Program Files (x86)\nodejs\node_modules\@feathersjs\cli\node_modules\yeoman-generator\lib\index.js:433:22)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

System configuration

This is a brand new project folder. I'm running node commands from git bash.

Module versions (especially the part that's not working):
Feathers Version: 3.9.0

NodeJS version:
v10.15.3

Operating System:
Microsoft Windows 10 Enterprise v10.0.17134

This is most likely a permission problem. Uninstalling and reinstalling with proper local permissions
should fix this.

commented

Can you elaborate @daffl? I've made sure to open the bash terminal in administrator mode before installing feathersjs/cli and running feathers generate app .

The CLI should be installed with local privileges. Admin mode should not be necessary and will probably cause other problems when used.