NodeJS not detected over remote Powershell - javascript

Installed nodejs and npm package on windows. No problems while running commands locally, but on SSH powershell (remoting in), it says "node" command not found. Similar results from npm command too.

Related

Error when running yarn command cannot find module

Error with yarn has happened on my windows machine. I installed yarn using choco and saw this error. I am trying to install yarn version 1.22.15 I am on node 17.0.1. I also tried updating my system env variables as well to point to the binary file. Also tried restarting my windows powershell as well.

How to run MEAN stack in docker on local environment?

I'm new to MEAN projects and I have a new project I've successfully cloned and need to get running locally to develop against. I have no idea where to start.
It has things like docker, lerna, yarn, etc. How can I get this working on my local dev machine? I have PC and Mac resources as well as resources like Azure and AWS (Cloud9).
Update
I had to do things like the following to get it up and running. Now, this took a few minutes to run. My question now is, will I have to stop and start this process each time I make a change (the npm run dev part, I mean)?
npm -v
nvm ls
nvm install 8.9.4
node -v
nvm alias default 8.9.4
ssh-keygen
cat ~/.ssh/id_rsa.pub
git clone <repo>
copy .env.dev
copy .env.local
Database connection strings
npm install -g lerna yarn pm2
sudo pip install docker-compose
export NPM_TOKEN=00000000-0000-0000-000-00000000000
echo $NPM_TOKEN
lerna bootstrap
npm run dev

Cannot run application forever using PM2

When I am running the application using npm start I can able to run the application without any error.
I have installed pm2 to run node from now on.
I am using the command PM2 start npm start:
then I am using PM2 logs npm command I am able to see the application running in the terminal:
But when I'm running the browser nothing is running.
Nothing is also running when I'm running the browser.
Your npm start will most likely be a command with the node prefix, to run pm2 on a node project you'll have to NODE_ENV=<insert env> pm2 start node server.js and for react you'll have to pack/build your project and do pm2 start http-server -p <insert port>.
Other ways off running this forever is through nginx etc.
Hope this helps :-)

NodeJS command "npm install express --save" raising exception

I have NodeJS installed and am trying to do this tutorial for making a NodeJS chat app: http://socket.io/get-started/chat/
I created the package.json file in it's own dedicated folder, and executed in the windows command prompt this npm command from the tutorial I linked.
npm install --save express#4.10.2
The error I receive is as follows:
Error: ENOENT, stat 'C:\Users\david\AppData\Roaming\npm'
So I wemt to the ExpressJS page, tried the command they list on their site, which is.
npm install express --save
And I receive the same error. Anyone know how to fix this, please?

Error in npm for npm install selenium-webdriver

I am using Windows Server 2008 R2 EE OS. In which I have npm package manager. I am trying to run the below command to install Selenium Webdriver package.
Command:
npm install selenium-webdriver
I am receiving below error while doing it.
Error:
node.js npm should be run outside of the node repl in your normal
shell
You are running the npm command inside the node shell.
Open another shell and just type "npm install bla-bla", npm should be on the PATH. Or cd to its directory and type command.
See my command images
Doing it wrong
Doing it right
In the case of windows, sometimes it is bad to consider that the npm will create folder itself for what it required.
The best is to manually create npm folder like "C:\Users\username\AppData\Roaming\npm".
Hope this help.
By creating a folder C:/Users//AppData/Roaming/npm solved my problem.

Categories