Amazon EC2 NodeJS npm does not install modules - node.js

I just configured a new micro intsance on amazon ec2.
I checked out node source code and build it.
Now i want to setup express and other node modules but npm does not work.
When i give command e.g. npm install express, it waits there without any further process.
Any help appreciated.

Related

Uploading Node.js app to WinSCP server

I failed to make my node app work in WinSCP. To my understanding, node version 6 is installed on the server, while my node version is at at 8+. Does it matter? I also got e.g. express, mongoose and handlebars in my app. Do I need to add those in the server as well?
What are the proper steps to upload a node app?
On the server, you should have node install the app. This way node will download and install the files/libraries that are required in your package.json file on the server.
try this.
Upload your project to the server and change to the directory of your project. if node_modules exists delete the folder then run.
npm install
This should create a node_module folder and install all the requirements.
Once the install is complete you should be able to run your app with.
npm start

How to install ghost (blog) as npm module in meteor

I have installed ghost as npm module via "meteor npm install ghost --save" in my windows 10 console. I develop my app on my local machine and I use meteor-up once I'm finished to upload the project to my site.
How do I install ghost via an npm module? I can't find a guide specifically for that, all the other guides are for Ghost CLI or other methods of install, I don't want to mess up my install.
I also want the ghost blog as a subdirectory, for example: mysite.com/blog

Can't get css, js files in admin after deploying keystonejs app. What should i do to make it work?

Example here http://clevercontent.org/keystone/signin
How should i deploy it properly?
There was a problem with RAM on my server on DigitalOcean. I don't have anough RAM to successful npm install. So i make npm install on local machine and moved node modules on server.
DON'T DO THIS
npm install must to be run on server. Because your node.js libs should be compiled by same C++ library.
So i extend SWAP on server and this is solve problem with npm install

Amazon AWS Node.js WebSocket

With the Amazon AWS Free Usage Tier, how should I deploy a simple Node.js WebSocket chat server that uses the ws & pg modules?
If you can: How to deploy a Node.js WebSocket server to Amazon Elastic Beanstalk?
Otherwise, what are all the steps I should take to set it up using EC2 directly?
Or, should I do it with OpsCloud?
You CAN use Elastic Beanstalk with the free usage tier. However if you want to run both Postgres and Node.js, you might find you need to roll your own EC2 instance to remain within the free usage constraints - check here: http://aws.amazon.com/free/
EB does make it relatively simple to deploy, and if you do your development setup correctly, EB will install the extra node modules you need.
In any case, when developing you will find you need to install new modules - I'm sure you're familiar with the npm install mechanism. What you need to add to that is the --save option, so
npm install pg
becomes
npm install --save pg
This then adds that package to the dependencies section of the package.json file. When you deploy to EB or any other dev ops system, these dependencies are automatically installed (the system runs npm install). If you are cloning from a repository onto your server, then running npm install yourself will install those modules.
Hopefully this helps you get the modules you need installed on the server. It's worth noting that your node_modules directory should not be shipped with your code - let the system build it when deploying.

meteor deploy npm packages

I use multiple npm packages in my meteor application, for instance the 'knox' package for amazon s3 access.
On my local system I don't have any problems, because I have the 'knox'- npm package installed on my system. But on the server this is obviously not the case.
I have read different suggestions what I could do:
1)
Install the npm module into the /public folder of my application
- unfortunately I don't know how to do that.
2)
I followed this tutorial:
NPM Deploy Tutorial
I created packages/knox/package.js packages/knox/knox.js and I am pretty sure I did everything as described in the tutorial but this is not even working locally
Use npm package from Atmosphere. See details on how to use it.
Did you remember to add the knox package to the .meteor/packages file?
The link you shared is pre Meteor 0.6.5, which loaded all packages in packages/ automatically. Now, you need to specify them individually.

Resources