Running 'grunt' command on mean.js app just stalling - gruntjs

I am following the installation guidelines as described on mean.js.org Everything seemed to install fine. I have all prereqs installed. I ran npm install after cloning the github repo and then tried to run grunt and I didnt get any errors however It seems to just be stalling on the command line. Last message on the command line is the "debugger is running on port 5858" and then it just sits there.
After some time the message [nodemon] watching 51,839 files - this might cause high cpu usage. To reduce use "--watch" comes up. I am on windows 10 and have all the latest versions of node,npm,grunt and mean.js. I am running the command line as admin.
Mean.js should be running on localhost:3000 but it is not.

This is intended.
There is an application invoked by the grunt command and running in background, watching your files for changes. In default configuration: nodemon and grunt-watch.
This will execute specific tasks based on the files you edited, such as linting JS files or compiling LESS files.
The cmd will probably show something when you edit files in the projects directory.

Related

NextJS stuck at compiling

All of my next apps are getting stuck at event - compiled successfully when I try and run them using yarn dev. Everything from existing apps I've used before to brand new apps I literally make just for trying this fresh.
I've tried deleting node_modules and yarn.lock, running yarn again, then running yarn dev. No dice. I also updated node js to latest and tried a few iterations of the above, including some with a 'yarn build` step to see if that did anything. No luck.
Assuming it's some kind of machine config that got messed up, but I can't for the life of me figure out what it is. Ideas?
replace with it in package.json
“dev”: “next dev -p 1234",

Run protractor through angular-cli without internet

I need to run angular-cli e2e tests (ng e2e) on an offline development system (client restriction). However, an error occurs when Protractor tries to download chromedriver because of the connectivity issue. To manually copy the required files, I ran the command on an online system and then transferred the downloaded files from protractor node_module folder (protractor\node_modules\webdriver-manager\selenium\chromedriver_2.33 and a few other folders) to the offline system. The tests ran successfully a few times. However, the same error started again that the 'ng e2e' command causes to run webdriver-manager update although the driver file is there.
Below error appears on the console:
Error: getaddrinfo EAI_AGAIN chromedriver.storage.googleapis.com:443
Is there an option to turn off 'webdriver-manager update' and use a local copy of the required files?
Thanks for your help
There is a flag that you can add to your ng command
ng e2e --webdriver-update=false

mup deploy works but image won't start

I'm deploying my Meteor app with mup from a Windows 10 box to a Digital Ocean VPS. Latest version of mup, latest version of meteor, app runs fine on Windows and the app deployed and ran fine before adding node-uber NPM. I see the following error in the logs when the app tries to start:
npm ERR! enoent ENOENT: no such file or directory, chmod '/bundle/bundle/programs/server/npm/node_modules/node-uber/node_modules/sshpk/bin\sshpk-conv'
Obviously the problem is with the backslash in the filename, but not sure where that is coming from or how to fix it. It isn't referenced in the package.json for node-uber. I've tried editting the package.json for sshpk on the Windows side, but that doesn't make any difference. I can't edit the file in the Docker container because the container keeps restarting and kicking me out.
Anyone have any suggestions on how to fix this, perferably permanently so I don't have to jump through hoops every time I deploy?
Actually manually editting the package.json file does solve the problem. Turns out I have multiple copies of sshpk installed because the parent NPMs are specifying specific versions as being required.
So the "fix" for this problem is the edit the "bin" section of the sshpk package.json file to flip the "\" to "/", save and rerun mup deploy.
Sigh...

Why is Visual Studio looking for my gulpfile in the wrong folder?

Backstory
I've been trying to set up a project in Visual Studio, which uses GulpJS to compile Sass. I was told that VS should automatically recognize the package.json inside a project and run npm install, but I had to do that manually through a command line. Even then, when I opened Task Runner Explorer, it says that there are (No tasks found). My coworker and I looked up solutions that worked for other people, many of which reported having success after restarting VS, clearing some cached data, or reinstalling the node modules; however none of those worked for me. Here are some solutions I've attempted:
Visual Studio 2015 RC Gulp task runner not detecting tasks (All Answers)
https://stackoverflow.com/a/37437209/6425704
Basically the entire first page of Google for "visual studio gulp no tasks found"
The Problem
After some digging, I came across the Package Manager Console and decided that maybe I can run gulp through that instead of opening a separate CMD window. However, when I did, I got the following:
[11:27:43] Local gulp not found in C:\
[11:27:43] Try running: npm install gulp
My immediate thought was that I might need to reinstall the dependencies, so I ran npm install and got this output:
npm : npm WARN enoent ENOENT: no such file or directory, open 'C:\package.json'
At line:1 char:1
+ npm install
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (npm WARN enoent...:\package.json':String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm
WARN
!invalid#1 No license field.
This is when I noticed that it is looking for C:\package.json instead of the one inside my Project directory. However, when I ran ls, it clearly shows that it's inside the Solution root, at C:\Dev\solution-name. I tried navigating to the specific Project, using cd Presentation\Nop.Web, but I still get the result of it looking in the C:\ root. Can anyone explain why this is happening and how I can fix it?
I finally figured it out (one more day, and I would've offered a bounty for this question), and it's not a problem with VS. Back when I first started using this specific computer and was still using Windows' default Command Prompt, I didn't like it starting in %USERPROFILE% by default. So I looked for a way change the default and stumbled upon a registry "hack" which essentially runs cd C:/ on cmd.exe startup. However, it turns out that this causes other command line tools, including Powershell and VS's Package Manager to run that command.
If anyone else is experiencing this issue (which, due to the nature of this situation, I doubt anyone has), you can try following these steps:
Open up Registry Editor. I did it by using the Windows Run tool (Win + R) and typing regedit.
Navigate to HKEY_CURRENT_USER > SOFTWARE > Microsoft > Command Processor.
Remove AutoRun (or change its value to something that won't interfere with your workflow).
More info here.
Original Registry Tutorial (Note that if I had scrolled down a bit more, I might have avoided this situation.)

Running meteor on linux server

I am trying to get my localhost working on my remote (mediatemple) server.
I have bundled it up and have a /myurl.com/bundle folder with the following files.
this folder contains
main.js
npm-debug.log
programs
server
How do I get this to run?
You should take a look in the README inside the bundle folder. Normally everything ist described there to start your app.
Make sure that NODEJS and MONGO is installed on your remote server. This is NOT included in your bundle as well as NODEJS is not present.
If you are running a system like debian or ubuntu normally you can do the installation with
apt-get install nodejs mongo
Make sure, that the nodejs has release v0.10.36 or v0.10.38
node --version
At the README you see the necessary ENV-VARS like MONGO_URL and PORT you need to set to start your meteor app.
If you have running a apache server already the PORT 80 is already blocked, so try PORT=3000 to start your meteor app.
Example:
MONGO_URL='mongodb://localhost:27017/yourapp' ROOT_URL="http://yourhost" PORT=3000 node main.js
If using as above you do not need to export the ENV-VARS before start
Sometime when starting, there are missing NPM – you get fiber errors
In that case
cd programs/server
npm install
and the try start again.
Good luck
Tom
(I'm writing this response assuming that you are not worried about scalability issue, respond in comment if you want to scale your app)
The best option for running a node application, which Meteor application is, is by using forever.
npm install forever
forever start simple-server.js
If you want to figure out how to see the log files and how to stop/restart your service, you can run forever --help to see all the commands.

Resources