My meteor project gets bundled with a script and run with forever. Until now, the process used to work fine but for my last project it does not work.
I setup a clean server with no httpd process running to be sure there is no interference.
there are no errors but when I go to my application on http://dev.sertal.ch:4020 I get redirected to https://dev.sertal.ch
This is the bundle script:
#!/bin/bash
cd /root/projects/tablet-reporting/app
git pull
rm -Rf /opt/sertal/tablet-reporting-test
rm -f /opt/sertal/tablet-reporting-test.tgz
meteor bundle /opt/sertal/tablet-reporting-test.tgz
cd /opt/sertal
tar -xvzf tablet-reporting-test.tgz
mv bundle tablet-reporting-test
cd /opt/sertal/tablet-reporting-test/programs/server/node_modules
rm -Rf fibers
npm install fibers
this is how the app is started:
MONGO_URL="mongodb://localhost:27017/tablet-reporting-test" PORT=4020 ROOT_URL="http://dev.sertal.ch:4020" node tablet-reporting-test/main.js
it says
LISTENING
You might have the force-ssl package installed.
meteor remove force-ssl
Then rebundle and redeploy. Please let know if it doesn't work it might be some proxy thing instead.
Related
my npm install -g is not working as intended. It installs the package I need, however the CLI commands which comes from the package is always absent.
One example is, I was following the quick start on TypeORM.
It says
First, install TypeORM globally:
npm install typeorm -g
Then go to the directory where you want to create a new project and run the command:
typeorm init --name MyProject --database mysql
but when I tried typeorm init --name MyProject --database mysql. I got the error -bash: typeorm: command not found I think it has something to do with my environment path setting.
This is the output from my echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/aria2/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Postgres.app/Contents/Versions/latest/bin
Can someone help me with this?
OK I figured this out myself. Solution is here : https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
In Linux/Unix, if you are a normal user, i.e. not root, you cannot install global packages, as these packages are written to system folders. In your case, -g is doing nothing as it cannot access system folders, so it is installed locally as any other regular package. in order to fix your problem, you have to gain more privileges. To do so, you can run the command at the root level i.e:
sudo npm install typeorm -g
and then you can access it from anywhere as -g is intended to put it as global; no need to play with environment path settings as -g also take care of doing so.
if you need a bash session as full root (a root terminal, or in windows terms a cmd/powershell running as administrator) without really signing in to root account for security purpose, use:
sudo -i
and then do whatever you want as root without writing sudo everytime :D; as i said, this command opens the current terminal session as root, so you have to write it in each new opened terminal.
Hope it helps :D (It wiill actually ;))
To install package binary globally, npm needs to create links to /usr/local/bin, which may not happen if you don't give it permission. Try running with sudo.
$ sudo npm install typeorm -g
You can run
$ which typeorm
To check if it's installed properly.
You can use node version manager (nvm). But first uninstall your node.js.
Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Then
command -v nvm
Then exit and open your terminal.
Then you can install any version of node.js.
For install the latest version type:
nvm install node
When the installation is complete install your package:
npm install typeorm -g
Then it should work correctly.
I think im a bit late but it might help someone :D
sudo npm install typeorm -g --unsafe-perm
During running a dotnet console application I encountered this error. I ran it from a directory that had the .dll and .pdb file copied into it.
What is the cause of this error?
Please check chmod of application folder. When I change folder access mode, problem was resolved. I know it is a little weird but sometimes it can be related to that :)
You have to determine them like that;
sudo chown -R yourusername:yourusername /var/www/
sudo setfacl -R -d -m u:yourusername:rwx,g:yourusername:rwx,o::r /var/www/
If you don't have setfacl command please install ACL package via this command;
sudo apt install acl
If this doesn't work, please use this command when publishing your project(in Package Manager Console of Visual Studio);
dotnet publish -c Release --self-contained --runtime linux-x64 -o out
And it will create "out" folder in your solution directory, you can copy its contain to server.
the deps.json and runtimeconfig.json must also be copied into the directory that the .dll is invoked in. Without these files you will encounter this error.
If you're doing post-build copies, make sure to include these files.
I receive this error when I had compiled the dll using the incorrect runtime.
Running a linux-x64 binary on a linux-arm64 system will show this error and vice versa.
If you are running a solution that has multiple projects, check to make sure the correct startup project is set.
I'm looking for a guide to installing Meteor, including NodeJS and MongoDB, on Raspbian. I have seen a couple of online articles, however, they are 3-4 years old.
Found the answer and posting it here for others who may have the same question.
Part of these instructions are from:
https://github.com/4commerce-technologies-AG/meteor
Install meteor for ARM processors on Raspbian:
cd $HOME
git clone --depth 1 https://github.com/4commerce-technologies-AG/meteor.git
$HOME/meteor/meteor --version
Create a symlink
cd /usr/bin
sudo ln -s $HOME/meteor/meteor meteor
Test your install
cd $HOME
meteor create hello-world
cd hello-world
meteor
Open your browser to http://localhost:3000 to see the app working.
It hangs on the check_changes step at this command:
Command: cd /home/myproject/repo && git diff --name-only HEAD
With this output in terminal:
DEBUG [c3f0a05b] content/plugins/akismet/views/notice.php[m
DEBUG [c3f0a05b] :[K
A couple notes which may make this case unusual:
This is deploying a WordPress site.
WordPress core and plugins were (mistakenly) updated on the server using wp-cli so that production code and repository would be unsynced.
Solution turned out to be simple. But it required a lot of useless googling before I finally figured it out by trial-and-error. Posting this as a reference for others who may find themselves in this situation.
The fix was to ssh into the server and remove the repo directory from the project root:
cd /home/myproject
mv -v repo /tmp/cap-repo
After this, I was able to run the cap deploy command successfully.
I would be interested in hearing an explanation for the [m and :[K output.
The following is what I get when I start up my app:
meteor [[[[[ ~/......./app ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Starting your app...
It used to work on Meteor 0.7.1, but when I upgraded to 0.7.2 it never finishes loading up. Now I can't even run it on 0.7.1, only 0.7.0.1.
This happens to all my meteor apps on my computer. Any ideas of what the problem is or how I debug it?
The problem was a badly commented CSS file. I opened a comment tag in a CSS file and didn't close it which is what caused the problem.
You've posted this a couple of times. I've seen the problem with some of my projects. While I can't guarantee it will work, I hope it gives you a bit of an idea of where to look to clear your older data.
Look for all .build folders in your project and delete them.
cd your-project-name
rm -rf .build
cd .meteor
rm -rf .build
(Also repeat the same for your package folders)
Sounds like your install of Meteor is corrupt. Do a clean install:
Uninstall Meteor:
sudo rm `where meteor`
rm -rf ~/.meteor
Uninstall Meteorite:
sudo mrt uninstall
sudo mrt uninstall --system
sudo chown -R `whoami` ~/.npm
Install Meteor:
curl https://install.meteor.com | /bin/sh
Install Meteorite:
http://oortcloud.github.io/meteorite/