Node js Application- Getting 'command not found' after connecting project to github - node.js

I made a node js application and I was using nodemon to restart the server whenever I made changes, I made a repository on github and connected my node project. Now I can't run nodemon because it says command not found. I'm not sure about how to fix it.

install nodeman globally and try again,
hopes you do have configuration file and package.json
npm install nodeman -g

Related

Something's wrong when i create a new project vue

I am starting to learn vuejs and I have a problem while creating a vue project with terminal. As you can see in the picture, the loadDep status line keeps spinning without moving. Can someone help me solve this problem T.T
enter image description here
As I can not see which command you have fired for installation in your image.
Please checkout the official Document's Installation Page for more In Depth Installation Information.
https://v2.vuejs.org/v2/guide/installation.html
Use VueCLI for Command Line Installation.
If you are installing Vuejs using the terminal you need to:
Firstly install NPM package manager.
Then run the command below to install VueCLI:
npm install -g #vue/cli #vue/cli-service-global
After executing this command simply check if it works successfully by typing:
vue -v
It should print the vue version if it was successful.
Then you can create a Vue project by using following command:
vue create [Your Project Name]
It is all provided on VueCLI Site.

NestJS server dies when console is closed?

I created folder for project, copy package.json and run npm install, build locally nestjs project and copy dist into server. Then ran in console node dist/main.js. For testing I used a base NestJS project (nest new ...) which only return "Hello word" on 3000 port.
Server work fine, but after close of console will stop.
I think problem on VPS (Ubuntu) settings or may be need to add some parameters to NestJS.
Why it not work constantly?
Thanks in advance for any advice.
I resolved problem with npm forever - https://www.npmjs.com/package/forever
install it globally - npm install forever -g
then got to project dir and run - forever start dist/main.js
Seems all work fine.

Why is Heroku telling me it cannot find a package.json in my module when I do a heroku push

I created my own npm package from a fork of react-coverflow. It appears to be working fine in my app locally using it this way: "npm install react-coverflow-mod" --save.
I can run my app using "run with debug (F5)" in VsCode and npm start on the client folder to start the React front end.
Then I do an npm run build on the client folder, and it works just fine.
When I do a heroku push it fails everytime with this error:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "../../react-coverflow-mod"
as it does not contain a package.json file.
1. I know there is a package.json in the module because I can install it via "npm install react-coverflow-mod": https://www.npmjs.com/package/react-coverflow-mod
2. The installed module has a package.json file in it
3. My github repo has a package.json in it: https://github.com/leroyvaughan/react-coverflow
I'm not sure how I can fix this. Do I need a package.json to go into the /Dist folder? What is wrong here with Heroku.
It seams like heroku try to install a package from a relative path instead of the published name. That would perfectly explain why you can run locally but not on a production environment.
Open your project and search for the exact string displayed in your log: "../../react-coverflow-mod" and you should be able to find quickly where it is.
If you run on a unix system (don't know about windows) you can do a search using grep:
grep -rnw '/path/to/somewhere/' -e '../../react-coverflow-mod'
Make sure it includes your root folder which contain package.json, and might we wise to ignore node_modules which is always massive.

Jhipster cannot open main page

I tried Jhipster today and created a new project following the tutorial.
But when I run mvnw command and visit localhost:8080
I got this:
But I have already enabled JavaScript in chrome browser.
Why do I still get this message?
Any advise? Thanks in advance.
This is the status of my project, please refer to the pic below:
Please go through the readme file and then follow the steps given there:
npm istall
npm install yarn --global
yarn start
I use this in the first time run...
Go to app folder and run:
yarn
mvnw
and some times.. only for livereload Angular, in another command line window.
Go to app folder and run:
run yarn start
While generating jHipster gateway one needs to install npm packages separately, if not done this kind of blank page will be thrown.
One can go to project gateway directory and simply hit command npm install this will take a some time to download all required npm packages into your gateway application. Once done run npm start within project directory, it will run the UI application on port 9000 by default, if not changed.
I did the below steps and it is working for me:
yarn install
yarn start or yarn webpack:build:main

'npm EER! code 1' When installing dependencies using `npm install --production`

I am using flightplan to deploy my node.js application to my server. I run the command fly production in my CLI to deploy my app to the server. It does rsync fine, but when it comes to installing dependencies, I get the following error:
I made sure that I have sudo privileges on my server for this user and npm is definitely installed as it gives the version number when I run the command npm -von my server. I have tried to run npm install --production myself on the server as the deploy script does and I get the same error, meaning it is something to do with installing dependencies. Potentially, it could be because in my flightplan.js, when it runs the command git ls-files to get the files to copy across. it includes all the node_modules even though i've made sure that node_modules is in the .gitingore file.
Does anyone have experience with flightplan npm module/or know why my npm install isn't working on my server?
(I edited out my server IP address from the picture)
Thanks in advance!
I found that if I removed the node_modules folder by running command rm -rf node_modules/ then committed this to github, then re-ran npm install and then my call to fly production worked successfully.

Resources