Unexpected mongo exit code 100 with Meteor - javascript

I am trying to follow this answer:
https://stackoverflow.com/a/15752736/4167140
But the path /usr/local/meteor does not exist on my OSX. I ran a single Meteor app on my machine for months and it worked fine, but now that I have multiple meteor apps on my mount, I keep on getting...
Unexpected mongo exit code 100. Restarting.
...when I go to run any of the apps locally (aside from the first one I created).
Did I install Meteor incorrectly? I curl'd it down and I have the executable in /usr/local/bin/meteor, but I need to be able to access /usr/local/meteor in order to get verbose logging when I run mongod inside of the directory.
This happens even on Meteor applications that dont have any collections (just static content).
I have never run into this issue with any of the Meteor + MongoDB applications that I run on my Ubuntu boxes.

Before of to check the installation of Meteor, you could see in your app directory if there is any mongodb.lock, in that case just delete it with rm .meteor/local/db/mongodb.lock (that path is on my linux, maybe it can change a bit, so please check it)

did you try this? There's a bug on github for it...
https://github.com/meteor/meteor/issues/2772
Hey, I don't really have enough to go on for a good answer. But, the .lock file isn't the database. It's a file mongodb writes to prevent itself from starting again on your database. That would get messy. If mongodb crashed, and didn't delete the .lock it wouldn't start again without manual intervention.

Related

NPM START ERROR - This is related to npm not being able to find a file

I have a problem with npm, but specifically when starting my project for a simple server using node.js.
hello network
I have a problem with npm, but specifically when starting my project for a simple server using node.js.
I tried to search in forums, videos and articles but the solutions didn't answer me.
The ERROR says that the package.json file is not in the directory, but it is - and the file contains "start" directing to the nodemon app.js command.
My directory
Error npm
Thank you very much
The error says that cmd.exe; is not found (and not, as you claim, package.json). Note the extra ; at the end which shouldn't be there.
Make sure your system's COMSPEC environment variable doesn't have this spurious semicolon at the end (if it has, remove it and restart your computer) and also that you don't have any .npmrc that overrides the shell with the bad path.

How to run npm start without opening browser for react development on linux

I am learning react and find myself running npm start on the terminal a couple of times but its annoying how it opens a new browser window everytime. I'm trying to stop this from happening on linux.
I found a solution for how to do this on Windows, but how can I do it on Linux?
Adding BROWSER=none to the .env file should get it solved.
If the folder /etc/profile.d doesn't exist create it. Then run touch /etc/profile.d/[any descriptive name here].sh and open it in the text editor of your choice. Then add export BROWSER=none there.
Then logout and login again. If it didn't work then try putting export BROWSER="none" in the file.
This is setting an environment variable.
Hope this helps.
fixed
create a .env file next to your package.json and put BROWSER=none inside
I don't think you need to run npm start so often. I've created my project via create-react-app which comes with Hot Module Reloading or HMR(restarts the server on any saved edit) in-built.
Starting a new React server multiple times can also be problematic as every time it will run on a different port. If you're integrating an API that has CORS set up for a particular port, it won't work on other instances.
What to do?
Create your application using create-react-app(cra) or add HMR using some library if you don't want to use cra. Here is a tutorial for that (haven't tested it).
Always keep a single dev server running. It will automatically reload on code change.
Stop the server by Ctrl + C when you don't want to use it.

Any way to generate documentation of a website project in a restricted environment?

Following the title, I have am unable to execute cmdlets, exe, shellscripts, vb. All that I am able open is git bash, but again, I have no admin rights. Are there any ways of accomplishing this? 1 idea i had was to create a local website that does this for us in the form where we upload a zip file to the website then it does its stuff then repacks it and sends it back to us via a local zip file download?
EDIT:
I am trying to document out a front end site coded in react. Only thing that is able to run anything within itself is Git Bash. No execution of .exe's or cmdlets withing Git Bash works though...
Well, apparently if u have git bash in ur restricted laptop and have the ability to push ur commit to git hub, it seems that using EDoc node module does the job.
Instead of saving globally (which won't work) do a npm install -save esdoc.
Then instead of running esdoc -c [json file], use ./node_modules/esdoc/out/src/esdoccli.js -c [json file]
Worked beautifully for me. Hope this helps anyone who faces a similar situation as me. Feel free to add additional methods to generate documentation.

Why do frameworks and git hub ask you to use Terminal?

I'm a newbie and that's ok.
But when I use tutorials, they always tell me to go straight to my terminal and install documents from there in which I have no clue what the next step is and no idea why I have to do it. Is it essential that I install frameworks through terminal or can I just work without it?
ex. http://net.tutsplus.com/tutorials/javascript-ajax/real-time-messaging-for-meteor-with-meteor-streams/
"Let’s create a very simple, browser console based chat application with Meteor Streams. We’ll first create a new Meteor application:"
meteor create hello-stream
I understand this is may not be very challenging, but I don't have a clear answer when I try and simply google it. Anything would help, thanks a lot!
Being a newbie is ok.
The terminal is the go to because writing programs, tools, and scripts with a couple lines of bash or python is, well, a couple of lines versus an entire gui and all the lines of code to go with it.
meteor create hello-stream
That's telling you to run the program called meteor with the supplied arguments (create hello-stream).
If you haven't installed meteor, do that next. From their website, open your terminal and type/paste:
curl https://install.meteor.com | sh
That downloads a file from the URL and pipes (|) it to the sh command. The file it downloads is a shell script that takes care of setup/installation. Now go back and try the meteor command again.
More reading
You might try and find a terminal tutorial. This is the first one I found:
http://www.ee.surrey.ac.uk/Teaching/Unix/
Answer from someone who only recently (as in: within the last year) got into using the Terminal more and more frequently:
It's generally a good idea to get used to using the Terminal for code-related things as you can pretty much use it platform-independently (meaning you can use the same commands on Mac, Linux, Windows,...) and because it makes you understand better what you're actually doing.
Once you've got the hang of it, it can make navigating your system as well as making changes to it easier. Hidden files, for example (like .gitignore files, or files in your .ssh directory, or your .bash_profile), can be viewed, opened and edited easily from the Terminal whereas you have to take multiple, complicated steps (or install other software) to view them from your Finder.
With the help of package managers (like Homebrew), which are also operated from the Terminal, you can also install software that isn't otherwise available for Mac.

Installing GameClosure on Windows

Does anyone know how to install GameClosure on Windows? According to the docs, on the installation guide, only osx is supported, although they have some success running on Linux and Windows. Unfortunately they don't expand on how to do this and a Google turns up only one promising looking page which returns a 404 (there is a cached version but it only seems to be a half article).
I have successfully installed the GC DevKit on Windows, there are a few additional steps like creating symbolic links BEFORE trying to install the GC DevKit.
Follow these steps carefully and you shouldn't have a problem getting it up and running. Read through them and try to understand what is required first.
Download the list of required items (Windows builds for Git, Node and Java) from the install guide.
Open up Git Bash (find it on the start menu under Git)
Continue with the install guide by cloning the repo (git clone https://github.com/gameclosure/devkit).
The files would have been installed to %USERPROFILE% if you did not change the directory while in Git Bash.
Move all the files in devkit\SDK somewhere else but make sure they are gone from that directory.
Open a normal command-prompt (cmd.exe).
Create symbolic links for everything that WAS under the devkit\SDK directory using mklink (available in Vista and above) from the command-prompt (not the Git Bash console). The files you moved in step 5 will contain the path as text that the link should be pointed to EG: > mklink /D "%USERPROFILE%\devkit\sdk\squill" "..\lib\squill\"
JSIO is special and actually needs to exist in a sub-directory at the time of writing. Create the directory devkit\SDK\jsio and then create a symbolic link INSIDE that going back one more relative path. EG: > mklink /D "%USERPROFILE%\devkit\sdk\jsio\jsio" "..\..\lib\js.io\packages\"
Go back you your Git Bash console and now continue with the installation for GC DevKit by switching to the devkit directory running the ./install.sh script as described.
Run basil by executing node src/basil [command]
If all the correct pre-requisites were in place everything should go smoothly. If basil throws errors it's more than likely the symbolic links, just check that everything is pointing to the right place and run ./install.sh to try again.
Good luck!!
There is now a full guide to installing Game Closure SDK on Windows here (I have also posted the contents in pastebin here in case the previous link disappears)
It's quite a process to get everything installed and configured, and looks like you can only develop for Android using the windows version of the SDK, but I may be mistaken
I wasn't able to get it installed on windows, but it's easy enough to install on linux, so I ended up using virtualbox and a linux vm. Cygwin could be another option but I didn't try it so unfortunately can't say for definite whether or not it would work

Categories