TypeError: Cannot read property 'jest' of undefined at ServiceGenerator.writing - feathersjs

I am trying to use cli tool for generating authentication in a featherjs app that wasn't built with featherCLI.
I have tried to added all the files it required but now it is giving me an error.
feathers generate authentication
? What authentication providers do you want to use? Other PassportJS strategies not in this list can still be configured manually. (Press <space> to select, <a> to toggle all, <i> t
o invert selection)Username + Password (Local)
? What is the name of the user (entity) service? users
? What kind of service is it? Sequelize
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'jest' of undefined
at ServiceGenerator.writing (/usr/local/lib/node_modules/#feathersjs/cli/node_modules/generator-feathers/generators/service/index.js:142:45)
at Object.<anonymous> (/usr/local/lib/node_modules/#feathersjs/cli/node_modules/yeoman-generator/lib/index.js:424:27)
at /usr/local/lib/node_modules/#feathersjs/cli/node_modules/run-async/index.js:25:25
at new Promise (<anonymous>)
at /usr/local/lib/node_modules/#feathersjs/cli/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/usr/local/lib/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 (/usr/local/lib/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)```

I've just stumbled upon this error and it is caused when you have no devDependencies installed. This is a bug on feathersjs-cli.
\npm\node_modules\#feathersjs\cli\node_modules\generator-feathers\generators\service\index.js line 158 doesn't check for undefined:
const tester = this.pkg.devDependencies.jest ? 'jest' : 'mocha';
temporary workaround: install anything as a devDependency, for example jest
npm i --save-dev jest
then run generator again

Related

Moodle: Exception - Call to undefined method theme_boost\output\core_renderer::get_setting()

After Installing the moodle website(Moodle Version: 3.8.1), on opening the login page(/login/index.php). I am getting below error.
Exception - Call to undefined method theme_boost\output\core_renderer::get_setting()
Please let me know what are the changes require.. in framework or in configurations

jhipster - create front end only

I am trying to generate a jhipster application but i only want the frontend .... the command I am running is
jhipster --skip-server --auth jwt
The error i get it
events.js:173
throw er; // Unhandled 'error' event
^
Error: ERROR! When using skip-server flag, you must pass a database option and authentication type using --db and --auth flags
at Environment.error (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-environment\lib\environment.js:157:40)
at module.exports.error (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\generators\generator-base.js:1488:18)
at module.exports.validateSkipServer (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\generators\client\index.js:159:26)
at Object.<anonymous> (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:418:27)
at C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\run-async\index.js:25:25
at new Promise (<anonymous>)
at C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:419:13)
at processImmediate (timers.js:637:19)
Emitted 'error' event at:
at Immediate.setImmediate (C:\Users\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:427:22)
at processImmediate (timers.js:637:19)
But i dont want a DB at all i just need a nice front end application
Ive just tried with --db sql,
then changed path in webpack.common.js SERVER_API_URL:
working fine.
So this key says what db is on your backend, and yes, it's confusing.

jHipster Generator for AWS not working

We have generated jHipster project using "yo jHipster" which runs fine locally.
Now, we want to deploy the application to AWS using Elastic Beanstalk.
I have tried deploying the WAR file generated for the jHipster project using the Elastic Beanstalk console, however, it fails to launch the application.
Then I came across a sub project of jHipster to generate the application for AWS directly. e.g. yo jHipster:aws
But I am getting the following error while running it. Any pointers to investigate this issue further please?
yo jhipster:aws
events.js:141
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'toLowerCase' of undefined
at module.exports.AwsGenerator.extend.initializing.checkDatabase (/usr/local/lib/node_modules/generator-jhipster/aws/index.js:23:37)
at Object. (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/base.js:436:25)
at /usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/node_modules/run-async/index.js:24:25
at /usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/base.js:446:8
at processImmediate [as _immediateCallback] (timers.js:383:17)

Getting an error while trying to deploy with Modolus

I am following this tutorial (using meteor on modulus) to test telescope app and how the deploy works
I am getting this error :
Unable to connect to any application instances.
And this is the log:
/mnt/data/1/node_modules/fibers/future.js:245
throw(ex);
^ TypeError: Cannot read property 'name' of undefined
at app/server/migrations.js:469:43
at [object Object]._.extend.forEach (packages/mongo/mongo_driver.js:965:1)
at [object Object].Cursor.(anonymous function) [as forEach] (packages/mongo/mongo_driver.js:812:1)
at Object.migrationsList.updateUserNames (app/server/migrations.js:462:14)
at runMigration (app/server/migrations.js:45:52)
at app/server/migrations.js:10:5
at Array.forEach (native)
at Function..each..forEach (packages/underscore/underscore.js:105:1)
at Meteor.methods.removeMigration.Migrations.remove.name (app/server/migrations.js:9:5)
at /mnt/data/1/programs/server/boot.js:229:5 [2015-04-09T22:31:49.395Z] Failed to start application.
Thank you !!
This is a common issue when you don't redeploy the application after the first step.
run this 2 commands.
modulus project restart
modulus deploy
NOTE be sure the URL don't have any blank space either.
From step three of the tutorial,
The Meteor app is not quite ready yet and the logs will show errors. We have to deploy first in order to receive a URL for Meteor's required environment variables.
Have you goen through and correctly defined all of the environment variables?

Meteor OAuth Exception while invoking method 'login'

While trying to login using the Meteor packages accounts-facebook and accounts-google, I'm getting an OAuth handler exception. Packages accounts-twitter appears to work fine and logs in perfectly. I haven't written any code, this is right out of the box using the accounts-ui package
The front end simply says "Internal Server Error" in red text, and the Meteor stack trace is the following:
Exception in oauth request handler [Error: failed]
Exception while invoking method 'login' Error: failed
at Request.Meteor.http.call [as _callback] (app/packages/http/httpcall_server.js:117:19)
at Request.init.self.callback (/usr/lib64/meteor/lib/node_modules/request/main.js:122:22)
at Request.EventEmitter.emit (events.js:96:17)
at Request.<anonymous> (/usr/lib64/meteor/lib/node_modules/request/main.js:654:16)
at Request.EventEmitter.emit (events.js:123:20)
at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/usr/lib64/meteor/lib/node_modules/request/main.js:616:14)
at IncomingMessage.EventEmitter.emit (events.js:123:20)
at IncomingMessage._emitEnd (http.js:366:10)
at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
at CleartextStream.socketOnData (http.js:1366:20)
I'm running the Meteor app on my own infrastructure with a working domain name. Any idea what's going on?
I had the same issue, and it turned out my service was not configured correctly, specifically I had the wrong Facebook app secret. Go into your mongo shell and check your meteor_accounts_loginServiceConfiguration to ensure it's set up correctly.
Start up Meteor, then go into the mongo shell via meteor mongo
Then type 'db.meteor_accounts_loginServiceConfiguration.find()' to show the documents in that collection. Now check your Facebook document to ensure it matches the app you created on Facebook exactly.
I did this and everything worked immediately.
Sorry for that. Our error reporting in these cases sucked. A fix is coming out in the soon-to-be-released Meteor 0.6.2.