Hot answers tagged

50 votes
Accepted

Docker COPY issue - "no such file or directory"

From the documentation : The <src> path must be inside the context of the build; you cannot COPY ../something /something, because the first step of a docker build is to send the context ...
  • 12.9k
50 votes

Docker COPY issue - "no such file or directory"

For me the directory was in the correct context, only it was included in the (hidden) .dockerignore file in the root of the project. This leads to the error message: lstat mydir/myfile.ext: no such ...
  • 601
22 votes

Any ideas on how to run maintenance on a site that is always under use?

There are a lot of things you could be doing to improve your deployment process. A few of them are: Ensure your code is well tested. Ideally you should have 100% unit test coverage, as well as ...
18 votes
Accepted

Allowing node.js applications to run on port 80

in order to avoid this error, you can resolve the non-symlink executable with which node, as full example: sudo apt-get install libcap2-bin sudo setcap cap_net_bind_service=+ep `readlink -f \`which ...
18 votes

map directive is not allowed here

Try adding this to your nginx.conf in the http {}: user www-data; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept ...
  • 452
17 votes
Accepted

docker-compose for nginx and nodejs server

You use the container's name as you defined it in docker-compose.yml. Docker provides the IP addresses for the named containers via DNS within each container, and updates them if the containers are ...
14 votes

how to stop node.js server

Try from another terminal killall node Works in OS X and Linux. It may also prevent respawning node processes. For instance if a node some_server.js is running it may that any normal kill command (...
  • 241
14 votes
Accepted

Where is the private key after using certreq for CSR generation on Windows 10?

It's stored in the Windows certificate store. When you import the signed certificate, you will find you have a corresponding private key. It matches them by modulus, if I recall. You can get a list ...
  • 25.1k
12 votes
Accepted

Checking file's existence by name in a GCS bucket with Node.js

They added the file.exists() method. const fileExists = _=>{ return file.exists().then((data)=>{ console.log(data[0]); }); } fileExists(); //logs a boolean to the console; //true if the ...
  • 191
10 votes

Does elastic beanstalk run the postinstall from a package.json file?

I've just come across this problem too. I found that a postinstall script would not run but a prestart would. Mine looks like this: "scripts": { "start": "node index.js", "prestart": "node ...
  • 201
9 votes

Centos 7 Can't yum install npm

On Centos 7, for installation of npm and nodejs, follow these steps 1. Open terminal 2. Run these commands (With sudo or root) yum install epel-release yum install npm nodejs
9 votes

Docker COPY issue - "no such file or directory"

For me the issue was that I was using docker build - < Dockerfile From the documentation Note: If you build using STDIN (docker build - < somefile), there is no build context, so COPY can’t be ...
  • 91
9 votes
Accepted

/var/lib/nginx/client_body/0000000011 failed (13: Permission denied) with node.js

As the error message says, this is a Permissions issue. This is usually caused by nginx process user (www-data for example) not have read/execute access to one of the parent directories. Check ...
8 votes

How to configure Systemd service unit to start Node app with "npm start" instead of "app.js"

I'm running a similar setup on Debian, and my service looks like this: ... [Service] Environment=NODE_PORT=3000 Type=simple User=www-data Restart=on-failure WorkingDirectory=/var/www/<your-code-...
  • 181
7 votes
Accepted

Node-sass error during installation of node modules

Solution is npm install --no-optional
  • 209
7 votes
Accepted

Cron job vs NodeJS setInterval for optimal performance

Advantages of cron solution less memory consumption for 90% of the time memory leaks are effectively eliminted the code is reloading all libraries every time so updates take effect on the next run ...
  • 3,734
6 votes
Accepted

Heroku Error R14 (Memory quota exceeded) using node.js

Here is the response from heroku. Looks like you need to make configuration changes and can't use the out of the box config. Hi Stan, Thanks for linking to those docs; I'll need to update that ...
6 votes

Any ideas on how to run maintenance on a site that is always under use?

It seems from what you say that you have a maintenance window from 1 am to 7 am every day the issue is not time but convenience. This is normal and many people just deal with it as part of business. ...
  • 115k
6 votes

ADFS Error - MSIS9605: The client is not allowed to access the requested resource

On Windows Server 2016 you need to explicitly grant clients permission to a resource, even when the access policy is set to "Permit everyone". Try this command: Grant-AdfsApplicationPermission -...
  • 161
6 votes
Accepted

Why is my bash script terminating?

Your script name has "node" in the name and pkill node is probably killing it. Using pkill -x node to kill only processes whose name is exactly "node" might be more to your liking. Or even pkill -f -...
  • 7,688
6 votes
Accepted

Should I be concerned about attackers spraying for vulnerabilities on our webserver?

This is perfectly normal internet background noise. As long as you keep your applications updated and endpoints known, there is no need to worry. If you want to filter the traffic from entering your ...
5 votes

How do you install Node.JS on CentOS?

Run as root on RHEL, CentOS or Fedora, for Node.js v4 LTS Argon: curl --silent --location https://rpm.nodesource.com/setup_4.x | bash - Alternatively for Node.js v5: curl --silent --location https:/...
  • 151
5 votes

Allowing node.js applications to run on port 80

Figured it out. Turns out however I installed node, created a sym-link in /usr/bin/node which pointed to another sym-link in /etc/alternatives/node which pointed to another sym-link in /usr/bin/...
5 votes

How can I configure a Haraka mail server to forward mails to another address on another domain?

What you need to do is first setup aliasing that address. You can do this with the aliases plugin (or the plugin you listed in your question). See the documentation here: http://haraka.github.io/...
5 votes

Nodejs : Depends: rlwrap but it is not installable

I had the same exact problem in Ubuntu 14.04. The solution: Download rlwrap from http://packages.ubuntu.com/trusty/rlwrap. Here is a Direct Link Install it sudo dpkg -i rlwrap_0.34-2_amd64.deb ...
  • 153
5 votes

How to remove RC4 cipher from node.js https server running on Windows 2012 R2

Disabling anything in the registry only affects what uses the Windows components for RC4 (IIS/IE). IIS Crypto is not related either - as you are not using IIS. But you are using the node.js built in ...
5 votes
Accepted

Why is Docker downloading so much when installing NodeJS?

Docker will install a lot more than the application itself because Docker is a container solution and not a package manager like apt or rpm. Docker should be compared to whole-system virtualization ...
5 votes

Any ideas on how to run maintenance on a site that is always under use?

Amending the other answers: You should follow the blue-green deployment model. When you want to release a new version you deploy it to an internal staging website. Then, you can run automated tests on ...
  • 245
5 votes
Accepted

Permissions setup for nodejs

Assuming that your application doesn't need write access to the application data (which it really shouldn't), we do the following: We break the users into two classes - node-<app>-runtime and ...
4 votes

Nginx proxy_cache_key and HEAD->GET request

This question is very old, but it is still relevant and unanswered. I just spend several hours finding a solution to this, Nginx from v .1.9.7, include a new feature which do exactly what you want. ...

Only top scored, non community-wiki answers of a minimum length are eligible