generator-node-restify-mongodb icon indicating copy to clipboard operation
generator-node-restify-mongodb copied to clipboard

Unable to Generate Config files

Open SarathSantoshDamaraju opened this issue 6 years ago • 4 comments

Hi, Generator is creating the following error

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

Error: ENOENT: no such file or directory, open '/Users/sarath/node_modules/generator-node-restify-mongodb/generators/app/templates/.gitignore'
    at Object.fs.openSync (fs.js:653:18)
    at Object.fs.readFileSync (fs.js:554:33)
    at child._prepCopy (/Users/sarath/node_modules/yeoman-generator/lib/actions/actions.js:44:17)
    at child.copy (/Users/sarath/node_modules/yeoman-generator/lib/actions/actions.js:76:19)
    at child.projectfiles (/Users/sarath/node_modules/generator-node-restify-mongodb/generators/app/index.js:61:10)
    at /Users/sarath/node_modules/yeoman-generator/lib/base.js:421:16
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

I went through the Closed issues as well, before rising this issue.

SarathSantoshDamaraju avatar Sep 17 '17 08:09 SarathSantoshDamaraju

when i run _grunt mongoimport --verbose_, show the folowing error: Error: not found: mongoimport


Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK

Registering "grunt-mongoimport" local Npm module tasks.
Reading F:\node\node-restify-mongodb\node_modules\grunt-mongoimport\package.json...OK
Parsing F:\node\node-restify-mongodb\node_modules\grunt-mongoimport\package.json...OK
Loading "mongoimport.js" tasks...OK
+ mongoimport

Registering "grunt-exec" local Npm module tasks.
Reading F:\node\node-restify-mongodb\node_modules\grunt-exec\package.json...OK
Parsing F:\node\node-restify-mongodb\node_modules\grunt-exec\package.json...OK
Loading "exec.js" tasks...OK
+ exec

Registering "grunt-mocha-istanbul" local Npm module tasks.
Reading F:\node\node-restify-mongodb\node_modules\grunt-mocha-istanbul\package.json...OK
Parsing F:\node\node-restify-mongodb\node_modules\grunt-mocha-istanbul\package.json...OK
Loading "index.js" tasks...OK
+ istanbul_check_coverage, mocha_istanbul
Loading "Gruntfile.js" tasks...OK
+ coverage, default, test

Running tasks: mongoimport

Running "mongoimport" task
Options: db="node-restify-mongodb-development", host="127.0.0.1", port=27017, collections=[{"name":"widgets","file":"data/widgets.json","jsonArray":true,"drop":true}]
>> Error: not found: mongoimport
Done.

tanliyuan avatar Nov 20 '17 14:11 tanliyuan

Do you have mongoimport available from the command line?

garystafford avatar Nov 20 '17 23:11 garystafford

I am getting this error which appears to be about the same:

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\generators\app\templates\.gitignore
    at EditionInterface.exports.copy (C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\node_modules\mem-fs-editor\lib\actions\copy.js:47:3)
    at module.exports.projectfiles (C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\generators\app\index.js:66:13)
    at Object.<anonymous> (C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\node_modules\yeoman-generator\lib\index.js:399:25)
    at C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\node_modules\run-async\index.js:25:25
    at Promise (<anonymous>)
    at C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\node_modules\run-async\index.js:24:19
    at self.env.runLoop.add.completed (C:\path\nodejs\v8.2.1\node_modules\generator-node-restify-mongodb\node_modules\yeoman-generator\lib\index.js:400:11)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

Sigkill9 avatar Feb 21 '18 15:02 Sigkill9

For some reason it appears when installing with npm the .gitignore file is being ignored! I just downloaded it into the templates dir and it works.

Sigkill9 avatar Feb 21 '18 15:02 Sigkill9