javascript - error in using path and dirname -


i have fixtures.js file in scripts directory. call initdb.js error happen :

loading fixtures ... d:\dev loop\challange\uber_send_email_service\node_modules\pow-mongoose-fixtures\mongoose_fix tures.js:38             if (err) throw err;                      ^  error: enoent: no such file or directory, stat 'd:\d:\dev loop\challange\uber_send_email_service\scripts\fixtures. js'     @ error (native) 

scripts/initdb.js:

mongoose.connection.once('open', function () {     process.stdout.write('loading fixtures ... ')     fixtures.load(__dirname + '/fixtures.js', mongoose, function(err) {         process.stdout.write('done.\n'.green)         process.exit()     }) }) 

as can see in error log drive name appeare 2 time :

'd:\d:\dev loop\challange\uber_send_email_service\scripts\fixtures. js' 

why happen ? wrong path or __dirname ?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -