Can't deploy to firebase . Get ENOENT error - node.js

Every time i run firebase deploy i get the following error
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/joseph/tmp/11484-12736-1f3kttw.tar.gz'
Any ideas on what could be causing it?

Apparently adding an empty tmp directory to the home folder fixed the issue. Running the command as root doesn't create the directory itself.

The question has inadequate details but it seems that the file /home/joseph/tmp/11484-12736-1f3kttw.tar.gz either doesn't exists or it isn't accessible by your running application.

sudo firebase deploy
That should do it!

Related

Images not loading immediately after uploading in sails.js when app is running on production environment

I have uploaded and stored images in /assets/images/path/to/image . All was fine in development environment. But when I run my app in production environment first got problem that Images not showing immediately after uploading. But can view the image after restart the server by sails lift.
I searched for solution and got the idea to copy the same uploaded file in /.tmp folder to Immediately access the uploaded image. So I try this solution and use following code to copy the images in .tmp folder...
var tempLocation = process.cwd()+ '/.tmp/public/images/custom/path/to/image';
fs.createReadStream(uploadLocation).pipe(fs.createWriteStream(tempLocation));
But then I got error when writing in .tmp
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open path/to/.tmp/folder;
I have grunt installed both globally and locally. So don't think it is a problem. Please help me to solve this problem. Thanks

Error running grunt/starting server.js

For some quick background, I am following a MEANio tutorial found here. Now, I am at the part where I have run mean init, it has finished, and then cd into the project directory and run
npm install
After fixing a brief JSON syntax issue inside package.json (the end of the file was slightly mis-typed), I attempted to run
grunt
Hook task, clean, jshint, and csslint all ran fine, and then when I get to the portion of the build script that runs
node --debug server.js
I run into errors
events.js:72
throw er; // Unhandled 'error' event
Error: listen EADDRNOTAVAIL
at errnoException (net.js:905:11)
at Server._listen2 (net.js:1024:19)
at listen (net.js:1065:10)
at net.js:1147:9
at asyncCallback (dns.js:68:16)
at Object.onanswer [as oncomplete] (dns.js:121:9)
[nodemon] app crashed - waiting for file changes before starting...
I am pretty clueless about the inner workings of Node, does anyone know what this error refers to? I followed the MEANio tutorial nearly exactly, with the exception of where my node is at, I just have it in a folder that I have added to my $PATH in my .bashrc file. Could someone give me some advice on what files to check/debug?
The EADDRNOTAVAIL error typically occurs when you are trying to run a server on a port that is already in use. That tutorial suggests that the port would be 3000 (which is a typical default for Node applications). You should check to see that you do not have anything else running on port 3000 already.

Strongloop error in slc loopback command

I've installed Strongloop in my Digital Ocean droplet, but when I try to begin a project with slc loopback this error appears:
events.js:72
throw er; // Unhandled 'error' event
^
Error: EACCES, open '/home/cae/apps/easylearn/package.json'
I've searched for this error or similar ones, but until now couldn't find anything...
Any tips?
EACCES errors typically have to do with bad file/directory permissions. Correct the permissions and the problem should go away.

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.

node.js & pdfjs 'Unknown file open flag'

I have pdfjs installed running on node.js started with nohup. I am able to start node fine and port 81 is open in the firewall. As soon as I attempt to go to it in the browser it logs the following error in the nohup.out log and node.js stops. The crazy bit is that I have this working on a temporary server that was created from an image of this one to insulate the live server while a worked all this out. Now I can't seem to replicate the success I had. I can supply the code from specific files if it would be helpful, just let me know which ones.
Server running at http://mydomain.com:81/
fs.js:186
throw new Error('Unknown file open flag: ' + flag);
^
Error: Unknown file open flag: rs
at stringToFlags (fs.js:186:13)
at Object.open (fs.js:224:44)
at new <anonymous> (fs.js:1062:6)
at Object.createReadStream (fs.js:1010:10)
at serveRequestedFile (/var/path/to/tools/pdfjs/test/webserver.js:211:23)
at Object.statFile [as oncomplete] (/var/path/to/tools/pdfjs/test/webserver.js:157:7)
Solved: Reinstalling node.js was the solution. If people encounter this error, it is likely that node either isn't installed or wasn't installed successfully. Try installing/reinstalling to correct.

Resources