Meteor 1.0.4.1 installation failed - node.js

I have been using meteor since 0.5 without any issues..For every security update, I used to remove the ~/.meteor directory and reinstall with the standard curl command instead of just updating. But now I am getting the following errors
rm -rf ~/.meteor
sudo rm /usr/local/bin/meteor
curl https://install.meteor.com/ | sh
Downloading Meteor distribution
######################################################################## 100.0%
mv: omitting directory ‘/home/raj/.meteor-install-tmp/.meteor’
Installation failed.
I tried removing both the ~/.meteor directory and ~/.meteor-install-tmp/ directory.
I even tried installing from the git repo
git clone git://github.com/meteor/meteor.git
cd meteor
./scripts/generate-dev-bundle.sh
./meteor
It's the first time you've run Meteor from a git checkout.
I will download a kit containing all of Meteor's dependencies.
######################################################################## 100.0%
mv: omitting directory ‘/home/raj/meteor/dev_bundle.xxx’
Failed to install dependency kit.
I am running several meteor projects in my machine so dependency cannot be an issue. No issues with internet connection too.
Running Linux Mint 17 Qiana which is nothing but Ubuntu 14.10.
Have checked the following questions too.
meteor installation failed - goes only up to 45%
Meteor.js installation failed
Meteor 0.7.1.2 installation error

Related

Npm install doesn't download dependency assets from Git LFS on Ubuntu

Background
I have a project that's split into several smaller projects with one main project that downloads the others as dependencies of the main project.
I'm using Gitlab to host my projects in private repositories, using deploy tokens to allow npm install to download them.
The dependencies are added to the main project using the following format in package.json:
git+https://name:token#gitlab.com/group/project.git
Problem
On Windows when I do a git clone of my main project and run npm install, it does download all the assets using Git LFS, but on Ubuntu the assets aren't getting downloaded. If I check the contents of all the files tracked by Git LFS all I get is the information Git LFS placeholder. I'm using identical commands and software versions on Windows and Ubuntu, but with different results.
I've tried:
Updating to same versions of Node(10.16.0) and Npm(6.10.2) on both Windows and Ubuntu
Updating to the latest versions of Node and Npm (I had to stick to version 10.x for Node because of some dependencies not working with 12.x)
Adding a .lfsconfig file that points to the repository as described in the following issue: https://github.com/npm/npm/issues/11151
Updating Git to the latest version (2.21 on Windows and 2.22 on Ubuntu)
Current workaround
Currently I'm cloning the main project then manually cloning my dependencies into node_modules so that they're all proper git repositories so that I can then use git lfs pull in them. It works, but it's not how it should work, especially not since it's working as it should on Windows.
Question
Why is npm install handling Git LFS differently for dependencies on Ubuntu vs Windows? How do I get npm install to work properly with Git LFS on dependencies, is there a settings somewhere I need to change to e.g. enforce Git LFS downloading?
Step 1. Inside of your repository, run the following command and then commit the resulting .gitconfig and push:
$ git config -f .gitconfig lfs.url https://gitlab.com/group/project.git/info/lfs
Step 2. In the directory in which you want to npm install your project, run for example:
$ npm install -S https://gitlab.com/group/project.git

Plain installation of current version of Wekan on Ubuntu?

Wekan is an open-source Kanban Board which used to be easy to install using nodejs (given that you already set up your MongoDB). I am stumbling upon the actual installation steps of the guide to install Wekan on Ubuntu 16.04:
Download the latest version wekan source code using the wget command and extract it.
wget https://github.com/wekan/wekan/releases/download/v0.63/wekan-0.63.tar.gz
tar xf wekan-0.63.tar.gz
And you will get a new directory named bundle. Go to that directory and install the Wekan dependencies using the npm command as shown below.
cd bundle/programs/server
npm install
Figuring out the last stable version is easy, there are new stable versions nearly every day (as of March 2019), which somehow seem to contradict the common definition.
More importantly, the directory bundle/programs/server does not exist, only server, but it does not contain a main.js which would be necessary to run
node main.js
Other resources considered:
I did of course check the official documentation, but it looks not up-to-date. The page https://github.com/wekan/wekan/wiki/Install-and-Update is redirecting to a rather untidy page which does no longer talk about a standalone installation.
I prefer a minimal installation and not a solution using snap like described at computingforgeeks
There is also an unanswered question about a more specific installation around: Installing Wekan via Sandstorm on cPanel which follows a similar approach.
The latest releases on the Wekan page are actually no ready-to-use node builds.
Wekan is built using Meteor and you will need Meteor to create the build. This is because you could also build it using Meteor against other architectures than os.linux.x86_64.
So here is how to build the latest release as of today on your dev-machine to then deploy it:
Build it yourself
[1.] Install Meteor
curl https://install.meteor.com/ | sh
[2.] Download and extract the latest Wekan
wget https://github.com/wekan/wekan/archive/v2.48.tar.gz
tar xf wekan-2.48.tar.gz
cd wekan-2.48
[3.] Install Wekan Dependencies
./rebuild-wekan.sh
# use option 1
[4.] Install dependency Meteor packages
Now it gets dirty. Somehow the required packages are not included in the release (an issue should be opened at GH). You need to install them yourself:
# create packages dir
mkdir -p packages
cd packages
# clone packages
git clone git#github.com:wekan/wekan-ldap.git
git clone git#github.com:wekan/meteor-accounts-cas.git
git clone git#github.com:wekan/wekan-scrollbar.git
# install repo and extract packages
git clone git#github.com:wekan/meteor-accounts-oidc.git
mv meteor-accounts-oidc/packages/switch_accounts-oidc ./
mv meteor-accounts-oidc/packages/switch_oidc ./
rm -rf meteor-accounts-oidc/
cd ../
[5.] Build against your architecure
meteor build ../build --architecute os.linux.x86_64
# go grab a coffee... yes even with nvme SSD...
Once the build is ready you can go ../build and check out the wekan-2.48.tar.gz which now contains your built bundle including the described folders and files.
Use this bundle to deploy as described in the documentation.
Summary
This describes only how to create the build yourself and I am not giving any guarantee that the build package will run when deployed to your target environment.
I think there is either some issue with the way the releases are attached on GH or they explicitly want to keep it open against which arch you want to build.
In any case I would open an issue with demand for a more clear documentation and a description for reproduction of the errors your mentioned.
Further readings
https://guide.meteor.com/deployment.html#custom-deployment

fatal unable to find remote helper for https

When trying to clone a repo with git on a Red Hat Enterprise Linux server:
git clone https://github.com/user/repo.git
I receive an error with output:
fatal: Unable to find remote helper for 'https'
I noticed the error when trying to install packages with Vundle for vim. When I looked at the log i found that it was git that was causing the error. The problem is not present when separately running:
sudo git clone https://github.com/user/repo.git
... and running:
/usr/bin/git clone https://github.com/user/repo.git
... also worked fine. Since I run git through vim in this case I want it to work with just the git command.
I have tried to uninstall all the yum-installed git-related packages. I have also tried the approach in this Stackoverflow answer without any results. I have tried to install the latest git from source with this tutorial.
After 2/3 of a work day trying to figure out what was wrong i manually removed every git-related file and directory i could find. Then i simply reinstalled git with
sudo yum install git
Now is everything working fine.
So try doing
find /usr/ -name 'git*' -type d
to find the git-related directories, then remove all these directories. After this you do a new search and pipe that into less to handle the possible large output,
find /usr/ -name 'git*' | less
take note of the exec files and remove them. Mine where in /usr/local/bin. After this you reinstall git with yum like above.

How run npm on deploy project via git? (hooks/post-receive: npm: command not found)

Problem
I created a project where configure a server in DigitalOcean with Apache and Git.
For init project on server, I run the following command:
cd /var/repo
mkdir project-example.git && cd project-example.git
git init --bare
I set up file post-receive with this code:
#!/bin/bash
git --work-tree=/var/temp/project-example --git-dir=/var/repo/project-example.git checkout -f
cd /var/temp/project-example
npm install
npm run build
rm -rf /var/www/project-example/*
mv -f /var/temp/project-example/build/* /var/www/project-example/
When I make a push to server remote via git on machine local, occurs followings errors:
remote: hooks/post-receive: line 4: npm: command not found
remote: hooks/post-receive: line 5: npm: command not found
However, accessing server via SSH and execute command:
# it works standard
cd /var/repo/project-example.git
source hooks/post-receive
Comments
System Server: Ubuntu 14.04
I installed node via nvm.
When a git hook runs, it does not necessarily have the same PATH variable set as when you log in via SSH. Try putting the full path to npm in your script when you call it; that should fix things.
UPDATE (June 7 2019):
A couple of commenters had issues with node not being found when using the above solution, which made me realize it is not very robust. Rather than put the path in the call to npm itself, you'd be better off adding the necessary path to the script's environment, e.g. if npm (and node) happen to be in /usr/bin/, add the following to your script before calling npm:
export PATH=$PATH:/usr/bin
In fact, a more robust way to make sure the hook works the same as it does when you are logged in via SSH is to find out what the path is when you are logged in (i.e. the output of echo $PATH) and set the path in your hook script accordingly (of course you may need to omit some user-specific paths, etc.)

Building syntaxhightlighter with nodejs in windows 7

I need to build Syntaxhighlighter from here: https://github.com/alexgorbatchev/SyntaxHighlighter
I have read these:
https://npmjs.org/doc/faq.html
Getting started with NODE.JS in windows x86
Get started with Node.js in Windows
Installing node packages / dependencies using npm on Windows Server 2008
It seems that installing Nodejs from here http://nodejs.org/download/ should be enough.
Step 3 in the syntaxhighlighter Building instructions says:
3.Then ./node_modules/.bin/bower install to download dependencies
I have this path on my machine:
C:\Program Files (x86)\nodejs\node_modules\npm\bin
and I can see a bower.json in the syntaxhighlighter zip file.
I have googled how to download dependencies for windows, but I cant find anything.
There is a lot of info here:
How do I get started with Node.js
but I think this is not for windows env.
Can you assist?
EDIT:
Ok, seems to work now.
Installed Git-1.8.4-preview20130916.exe and restarted.
Step 8 ok now.
Step 9 gives "grunt not recognized".
Tried
npm install -g grunt-cli
from here: https://github.com/gruntjs/grunt/issues/774
Now I have a pkg folder
Thank you sir
Install NodeJs for Windows per instructions
Install Git for Windows, select option to Add Git to your path.
Open a new command prompt in Windows. Ideally, open as an Administrator. Do not reuse existing command prompts. The path will only be set in a new command prompt properly.
Download the code for the highlighter or use git to clone
If you got the zip file, unzip it
From the command prompt, change the active directory to be the folder of the code you cloned or unzipped
Type npm install -g grunt-cli, then Enter after each of the following...
Type npm install -g bower
Type npm install
Type bower install
Type grunt build
Done.
You have to install git package in this way:
sudo apt-get install git
It's working fine!

Resources