ENOENT,在Nodeand Expressjs中没有这样的文件或目录

时间:2016-03-29 07:19:21

标签: javascript node.js express

说明:     当我运行node app.js命令时,它给出了错误`ENOENT,没有这样的文件或目录

 **ENOENT: no such file or directory**, open 
 c:\Users\kvuyyala\Documents\workfolder\node-search-master\logs\info.log2016-03-29

完成日志错误

      SMEInstance: 
      { hostname: 'https://pluto.fileserverapp.com/api/rpc.php' }
      TokenGenerator: 
      { hostname: 'http://192.168.17.15:8081',(Sample Url)
     path: '/Auth/apiToken?username=',
     method: 'GET' },
     sanitizeResultsMissingExtension: true,
     requestTimeout: 120000,
     resultUrlProtocol: 'https',
     ResultExtraFunctions: { metadata: true, annotatorUrl: true, downloadUrl: true },
     TokenOptions: { rejectUnauthorized: true },
     MetaIds: { proceedingDate: 19 } }
     info: ::1 - - [29/Mar/2016:06:12:16 +0000] "GET / HTTP/1.1" 404 148 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
    error: uncaughtException: ENOENT: no such file or directory, open 
    'c:\Users\kvuyyala\Documents\workfolder\node-search-master\logs\info.log2016-03-29' date=Tue Mar 29 2016 11:42:16 GMT+0530 (India Standard Time), pid=3816, uid=null, gid=null,
cwd=c:\Users\kvuyyala\Documents\workfolder\node-search-master, execPath=C:\Program Files\nodejs\node.exe, version=v4.2.4, argv=[C:\Program Files\nodejs\node.exe,
c:\Users\kvuyyala\Documents\workfolder\node-search-master\server.js], rss=108892160, heapTotal=84697168, heapUsed=53612856, loadavg=[0, 0, 0], uptime=91687.7662157

当我运行node app.js命令时,它会给我以下错误

 ****Error****: ENOENT: no such file or directory, open 'c:\Users\kvuyyala\Documents\workfolder\node-search-master\logs\info.log2016-03-29'at Error (native)
at Object.fs.openSync (fs.js:500:18)
            at Object.fs.readFileSync (fs.js:352:15)
            at Mime.load ( c:\Users\kvuyyala\Documents\workfolder\node-search-master/node_modules/mime/mime.js:54:20)
            at Object.<anonymous> ( c:\Users\kvuyyala\Documents\workfolder\node-search-master/node_modules/mime/mime.js:90:6)
            at Module._compile (module.js:460:26)
            at Object.Module._extensions..js (module.js:478:10)
            at Module.load (module.js:355:32)
            at Function.Module._load (module.js:310:12)
            at Module.require (module.js:365:17)

我曾尝试使用:

`npm cache clean,
    sudo npm cache clean,
    rm -rf ~/.npm` but no use.

app.js

var io = require('socket.io')(server, { path: virtualDirPath + '/socket.io' });

server.listen(process.env.PORT || 8088);
io.on('connection', function (socket) {
      console.log('new connected established\n'.socket + socket.socket);
socket.on('search', function (data) {
var count = 1;
console.log(('new search request on socket \ndata passed:' + JSON.stringify(data)).socket);
logger.info(data);

0 个答案:

没有答案