I would like use Meteor Up for deploy my app on my Digital Ocean server.
I've init with mup init and config my mup.js. When i run mup setup, it just open my mup.js on my editor ..
Do you have any idea why the file is opened and not config my server ?
THank you !
Problem is the mup.js has an association with a program, instead of typing mup use
mup.cmd
eg
mup.cmd setup
mup.cmd deploy
I had a similar problem where my command line would not run the mup commands. I finally found a solution where I used windows PowerShell.
Just click the Windows Start button and search PowerShell, run it and use the commands just like you would in a regular command prompt.
Related
I have installed the firebase tools, however whenever I try to initialize it in my rootfolder, using the terminal from Vscode, I receive the following error. Why is that?
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Install firebase globally
npm i -g firebase
and then,
firebase login
firebase init
TLDR: Just delete your firebase.ps1 file and try again
I would not recommend bypassing the execution policy on PowerShell, as it makes your system more vulnerable to malicious scripts.
Instead, simply delete the firebase.ps1 file at the location indicated by the error message and try running the command again.
Note: in case the above doesn't work, you might need to clear your npm cache by running npm cache clean --force.
Source: https://stackoverflow.com/a/54776674/1536286
Run the following at the terminal in VS Code (make sure the app is run with the option Running as Administrator as suggested by #MaylorTaylor)
Set-ExecutionPolicy RemoteSigned
Then run the script in that same console.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
This worked for me
Open Windows Power Shell as Administrator and then run the below command to change Execution Policy setting to RemoteSigned
Set-ExecutionPolicy RemoteSigned
Now change directory to your project folder and run the following
firebase login
firebase init
Close cmd and powershell and VS Code.
Then right click on VS code---RunAs Administrator
and in the VS Code Terminal run the following command:
Set-ExecutionPolicy Unrestricted
Then in the same VS Code cmd run:
firebase login
firebase init
This should solve your problem.
Windows now comes with an extra layer of security to protect your OS environment from random scripts running in the background without admin privilege's.
Most Random Scripts(From browser engines on unverified sites and applications) are also bad for your OS,unless you are running them yourself as an admin or as a developer,provided you know what you are doing.
Firebase scripts are pretty safe.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Run this in your current working directory, i.e where Firebase is initialized and run this command, worked for me.
If using VScode, installing the PowerShell extension by Microsoft will solve this issue.
enter link description here
Instead of setting Execution Policy. I ran windows terminal as administrator instead of VS code terminal and execute command without an issue.
Simply in VScode switch from PowerShell to cmd
and type this command.
firebase login
And you will be redirected to your browser to allow Firebase CLI to access the account connected to your firebase project and then type this command.
firebase init
That should work
In cmd it works
firebase login
firebase init
Select project
The solution for me: is that i am using Windows 11 and i used to use Windows Power Shell instead of Command Prompt
In case want to use Windows Power Shell you have to run this cmd first:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
I have a meteor app that needs to periodically read a file located on the host's file system, outside of the app package. I am using node's fs to accomplish this, and it works fine on my (macOS) development machine.
However, when I run mup deploy to deploy it to my (Ubuntu 14) server, mup returns the following error after starting meteor:
Error: ENOENT: no such file or directory, open '/home/sam/data/all_data.json'
at Object.fs.openSync (fs.js:652:18)
at Object.fs.readFileSync (fs.js:553:33)
Does anyone know why this might be happening?
you should follow mup documentation closely. Have you seen volumes setup in mup config? Try this to solve your issue.
Reason: mup runs app in docker without any access to host file system unless specified. Volumes setup does this for you with mup deployment.
Below is the part of mup config from http://meteor-up.com/docs.html, Everything Configured, read more to get a better idea.
name: 'app',
path: '../app',
// lets you add docker volumes (optional). Can be used to
// store files between app deploys and restarts.
volumes: {
// passed as '-v /host/path:/container/path' to the docker run command
'/host/path': '/container/path',
'/second/host/path': '/second/container/path'
},
The user you have that is running your meteor build on the server needs to have access to that folder - read access. I would store the file in a different directory than the home one, because you don't want to mess it up. Either way doing something like chmod -R 444 /home/sam/data should give read access to any user for all files in that directory. You are probably running meteor as your local user(sam?) in development mode on your macOS, but the built up gets run as meteor or some other user on ubuntu, because of mup and forever.
I installed heroku cli on windows 10 via exe installer.
When i try to run heroku --version command or heroku login
command, the command window does not respond. It does not give any error.
Then i uninstalled it and installed it using npm install -g heroku-cli
but getting same result.
Node version - 8.7.0
In Windows cmd prompt, do:
echo %USERPROFILE%
Go to your C:\Users\YOURNAME
Look for a file named:
_netrc
This file stores login credentials. Delete it.
Then check for an update:
heroku update
Then try to log in:
heroku login
I saw some people create an environment variable called HOME and add the path to YOURNAME so the environment knows to look for the _netrc file there.
Other trouble-shooting ideas if the above doesn't work for you can be found at Heroku CLI troubleshooting
In windows , run %LOCALAPPDATA%\heroku, completely delete this folder. and check again on cmd by typing heroku --version. Hope this helps.
I ended up uninstalling heroku from the Windows Installer and instead used the standalone tarball.
You can get the tarballs from here.
After you downloaded and extracted it, you can go to your terminal and cd into the directory where you extracted the file and do the following command:
./bin/heroku --version
Whenever you need the heroku CLI, you can cd into the directory where heroku is, then ./bin/heroku is the executable for heroku.
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.
I want to install wordpress on heroku and follow this tutorial(https://github.com/mhoofman/wordpress-heroku) I downloaded the toolbelt of heroku and got the git repo on my disk I also created a heroku account but when I want to add postgresql to it i get:
$ heroku addons:add heroku-postgresql:dev
! autoupdate in progress
! No app specified.
! Run this command from an app folder or specify which app to use with --app
<app name>
Why I do everything as stated in the tutorial;?
I appreciate your answer
Ok got it!!! I thought to complicated!!! I had to create an app first;P