Answer the question
In order to leave comments, you need to log in
Why is there an error with path.join?
I'm trying to master node by this screencast
here is the code
ar nconf = require('nconf');
nconf.argv()
.env()
.file({ file: path.join(__dirname,'config.json' )});
module.exports=nconf;
/var/www/html/chatnode/config/index.js:4
.file({ file: path.join(__dirname,'config.json' )});
^
ReferenceError: path is not defined
at Object.<anonymous> (/var/www/html/chatnode/config/index.js:4:19)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/var/www/html/chatnode/app.js:4:12)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question