Error: ENOOET: no such file or directory - node.js

I have small problem. In my nodejs/express application i use the passport-local strategy for processing authorization information. Recently I began to receive a message in the my nodejs console:
Error: ENOENT: no such file or directory, chmod, rename
'C:\olympus\SRC\Gui\app\sessions\WCe9twVKOmignsse_g3H4Uyml2ACz1W5.json.790444257'
-> 'C:\olympus\SRC\Gui\app\sessions\WCe9twVKOmignsse_g3H4Uyml2ACz1W5.json'
at Error (native)
This is very annoying.
How can I remove this messages from my console?

Related

Vercel deployment, enviormental variables

Hey guys im trying to deploy my website and I keep getting stuck on these issues vercel build then vercel deploy -- prebuilt I get the error message of Error: ENOENT: no such file or directory, stat '/vercel/path0/.vercel/output/functions/_next/data/f3doRdmrRJC9QWLs2rG4w/index.json.func'
But when I run vercel deploy depending on my environmental variables for NEXT_PUBLIC_BASE_URL if I put http://portfolio-build-lem0bum28-bchang0999.vercel.app as my value the result i get is Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error FetchError: invalid json response body at https://vercel.com/login?next=%2Fdeployments%2Fportfolio-build-lem0bum28-bchang0999.vercel.app%3Fhost%3Dportfolio-build-lem0bum28-bchang0999.vercel.app%26redirect%3D1%26section%3D reason: Unexpected token < in JSON at position 0
if i put the NEXT_PUBLIC_BASE_URL with a value of http://localhost:3000 the error code I get is FetchError: request to http://localhost:3000/api/getPageInfo failed, reason: connect ECONNREFUSED 127.0.0.1:3000
any help to resolve this so I can deploy and move on from this project would be nice
http://portfolio-build-lem0bum28-bchang0999.vercel.app errorlocalhost:3000 error

How Can i open different files using expres.js?

I'm starting a journey with node.js and frameworks and I get big problem. I set up API on localhost:3000 and I wanna open different files by adding to URL word for example localhost:3000/quiz.
I used command res.sendFile(path.join(__dirname+'/index.html'));
but i only get,, Error: ENOENT: no such file or directory, stat 'C:\Users\Darek\Desktop\Frontend\Quiz api\index.html'"
Thanks
CLOSED
EDIT:
Routes files called quiz.js
Index.js server code

Iin meteor deploy server Error: ENOENT, no such file or directory

in my meteor application I am using node fs to write the file, but when I deployed my application at meteor.com server then I am getting error in meteor logs.
WARNING Error: ENOENT, no such file or directory 'testaudio/server/uploads/6_40_16_340.pcm'
at Object.fs.openSync (fs.js:432:18)
fs = Meteor.npmRequire('node-fs'); in my server and i mentioned the version in packags.json
I am writting file inside /server/uploads/file_name in my application.
I dont know why I am unable to write the file at server. event I tried with full path by using
fullPath = meteor_bootstrap.serverDir that gives path like :-
/appDir/.meteor/local/build/programs/server

nodejs newrelic throws Error: EACCES, open '/newrelic_agent.log'

I just tried to get newrelic tracking on my node app working (http://newrelic.com/nodejs), however I get the following error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: EACCES, open '/newrelic_agent.log'
According to newrelic node is logging to the same directory. However this seems to me that it is trying to log to the root directory?!
Manually creating the file in the server root works. However this isn't what I like to do. Is this a bug?
How can I set the log path?
You can change your log path in your newrelic.js configuration file.
logging : {
filepath : 'log_path_here'
}
Or
You can set the log path with an environment variable. You an use the NEW_RELIC_LOG environment variable.
Environment variables override settings made in the newrelic.js config file.

ENOENT error using nodejs on heroku

I'm getting an ENOENT error on my heroku app, preventing it from starting up:
Error: ENOENT, open '/app/log/production.log'
This file / dir (app/log) does exist however...
So I'm not sure what's going on?
I ended up disabling 'quiet' mode to stop writing logs to disk:
app.disable('quiet');
This seems to of resolved it

Resources