react-360 did not create project - reactjs

I installed react-360 using npm install -g react-360-cli.
But react-360 init Hello did not create any directory.
I am using ubuntu 14.04.

Any errors you have encountered?
1) You could be having permission issues while trying to install packages in node_modules folder. Try changing the permission to the folder like:
sudo chown -R USERNAME /FILE_PATH
2) Try updating node version if 1st doesn't work.

Related

Why can I not install Node with Homebrew?

I was able to download homebrew successfully. However, whenever I use 'brew install node' , I am getting the error message:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
You can try again using:
brew link node
I have also tried 'brew link node' which results in:
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
Can anyone help please?
The solution is in the official troubleshooting page of Homebrew. You have to give Homebrew the right to write inside /usr/local. To do this the official command to run is:
cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks
If you have not installed applications in /usr/local that rely on specific permissions, you can also run:
sudo chown -R $(whoami) /usr/local/*

I can't seem to use npm, git and node on my system

I'm running a Windows 10 machine. I have tried to install node and git but whenever I try using git or npm it just return the user pointer back.
WindowsPC MINGW64 /c/Angular
$ git clone https://github.com/angular/quickstart my-app
Cloning into 'my-app'...
WindowsPC MINGW64 /c/Angular
that is what happen when i use git. it did not create the folder my-app
and if am using the cmd
C:\Users\Username>npm -v
C:\Users\Username>
Nothing seems to work
however if i try to check node-v it works fine.
C:\Users\Username>node -v
v6.10.0
C:\Users\Username>
so do any one what could be the cause of this?
Because I can't learn angular 2 because of this
As git clone didn't report any error it seems it was successful.
So just do cd my-app after the git clone and you should be inside your newly cloned repository.
and if you just
md my-proj
cd my-proj
git clone https://github.com/angular/quickstart.git
files are there ?

error: import pychart , during install source code odoo 9.0

I wrote so many thing in requirements.txt and reinstalled but it didn't work out. I installed odoo 9.0 source code for windows. The command prompt is showing error:
from pychart import *
What do I need to write in requirements.txt for pychart?
As i just ran into the same problem unrelated to odoo.
The following command solved it for me:
pip install Python-Chart
To install the python packages for odoo you can use below command found from this detailed odoo install guide
cd /tmp && wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt && sudo pip install -r requirements.txt
It will install all the python dependacy in just one command.
Hope this helps.
You have to install that package before you use that, If are on ubuntu command is pip install pychart and if you are on windows the command is c:\Python27\Scripts\pip.exe install pychart.I assume you have installed python on default folder c drive.
Why don't you create a module like install_module and on depends you can add required list of module to install. If you install that module it'll automatically install all depended module. I'm using this same. Instead of command prompt it'll be quite easy too. You can view the depends module list in Technical Data of that install_modules.
I Hope it'll be helpful.

Launch Nodejs/Angularjs app in Ubuntu

I have just read tutorial on Angularjs and wanted to run test application (by (C) Wahlin Consulting) from http://tinyurl.com/AngularJSDemos . Its readme informs that:
NODE.JS OPTION:
If you want to run the site using Node.js (install it from http://nodejs.org) run the following at the command-prompt from within the AngularJSDemos folder:
node server.js
Now navigate to http://localhost:8080/DemoList.html or http://localhost:8080/CustomerManagementApp in your browser.
I have installed nodejs and tried to launch it from terminal in my Ubuntu system:
mainuser#mylaptop:~$ cd /home/mainuser/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos/
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node server.js
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
Try: sudo apt-get install <selected package>
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ sudo apt-get install node
...
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node server.js
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node server.js
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node ./server.js &
[1] 11153
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node ./server.js
[1]+ Exit 1 node ./server.js
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ node ./server.js
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
The following packages were automatically installed and are no longer required:
kde-l10n-engb kde-l10n-pl linux-headers-3.13.0-32
linux-headers-3.13.0-32-generic
Use 'apt-get autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 28 not to upgrade.
mainuser#mylaptop:~/Ebooks/AngularJS/AngularJSDemos/AngularJSDemos$
But whatever I do, I cannot launch this example. In Chrome "This web page is not available" and in Firefox "Unable to connect". Moreover, it looks like I simply cannot launch it in terminal.
How to launch this example?
I'd recommend using nvm to install node and manage different version on your system.
It's quite easy:
# First, we need to clone the nvm repository:
$ git clone https://github.com/creationix/nvm.git ~/.nvm
# Then, we need to add the following line to our .profile, .bashrc or .zshrc:
$ echo "source ~/.nvm/nvm.sh" >> .zshrc
Installing nvm is not enough, we now need to install node & npm.
# To print out the list of all the available versions, simply run:
$ nvm ls-remote
# We want to install the current stable version which is v0.10.26, so we need to run:
The -s flag means we want to compile node from source.
$ nvm install -s v0.10.30
When the installation process is finished, our brand new node and npm will be installed!
The great thing with nvm is that you can use a different version of node in each of your shell instances. But if you want to stick to the latest version, you can set it as default by running:
$ nvm alias default 0.10.30
Make sure everything is up and running by typing node -v && npm -v
Here's a different approach for this problem, the tutorial is suggesting using npm and it's fine. but it takes time, an internet connection and setting up.
Here's an alternative way, if you're already using Ubuntu, python should already be installed in your system. your python installation already comes with a simple HTTP server you can use to run your angular application.
in your console, type python -m SimpleHTTPServer 8080
then direct your browser to localhost:8080
and locate your angular project. then it should run properly.
You probably installed incorrect node package.
Thanks to that your node command is not equal to nodejs but invokes something totally different.
Try with
nodejs ./server.js
Install node in ubuntu using
sudo-apt-get install nodejs
sudo apt-get install npm
sudo apt-get install build-essential
and then run your server with following command
npm start

npm / yeoman install generator-angular without sudo

I tried to install generator-angularjs using Yo (Yoeman) without sudo:
npm install -g generator-angular
I get:
Error: EACCES, mkdir '/usr/lib/node_modules/generator-angular'
When I type in sudo yo, yo tells me that I should not use sudo (which is perfectly understandable).
I have a ~/node_modules directory - why doesn't yo install its packages there?
Generators are designed to be installed globally. Otherwise, you always have to install the generator you're about to use in each project, which is unnecessarily painful. Also, you don't get to see the lovely yo menu which lists you all the available generators (unless of course, you install them all locally):
Setting up npm for global installation
So, how do we get npm to install packages globally? As you correctly said, you should never, ever run yo with sudo. There are lots of different solutions to this problem and you can spend hours discussing their pros and cons religiously.
I personally dislike installing my user packages into the global /usr/ folder. /usr/ is for software that is shared across all users on the computer. Even if it's only using the machine, there are still good reasons to respect the way the Unix file system hierarchy is designed. For example if you decide at one point to wipe your whole node installation.
My preferred way of enabling npm to install packages globally without breaking out of $HOME is to set a local node prefix. This is as easy as running
echo 'prefix = ~/.node' >> ~/.npmrc
in your local shell. After that, you want to adjust your $PATH, to point to the new installation destination for global node executables by adjusting your favorite shell's config. E.g. by adding
export PATH="$PATH:$HOME/.node/bin"
to your ~/.bashrc. After that, you can happily run npm install -g generator-angular without sudo, without running into permission conflicts and if something is completely broken and you want to start from scratch, all you need to do is remove your ~/.node directory.
Thanks to #passy I managed to finally get this working on ubuntu 13.04 (in case anyone is having similar set up issues) with the following :
sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
trying to run:
npm install -g yo
resulted in
Error: EACCES, mkdir '/usr/lib/node_modules/yo'
Fixed using:
echo prefix = ~/.node >> ~/.npmrc
echo 'export PATH=$HOME/.node/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
Running:
yo webapp
resulted in:
Error: EACCES, permission denied '/home/username/.config/configstore/update-notifier-yo.yml'
Fixed using:
sudo chown yourusername:yourusername /home/yourusername/.config/configstore/update-notifier-yo.yml
hi in my case (on ubuntu 12.04), the prefix addition in ~/.npmrc did not changed anything.
if so, build the node package by yourself and install it in /opt/node or /home/user/.node.
I had an almost identical error involving a rogue .yo-rc.json file in my root directory from a project I installed earlier. Yeoman was switching cwd from the installation dir to root dir half way through the installation, but was only outputting the EACCESS permissions error without any details that the installation directory was /. It took ages to figure out why this was, and involved debugging through the Yeoman source, but I eventually learned that Yeoman will look up through the directory tree until it finds a .yo-rc.json, and generate the code there by calling chdir to the new location.
Yeoman should maybe check that the user has write permissions for the directory. Alternatively, it could mention in the output either that the cwd has changed, or print the name of the installation directory if where it finds .yo-rc.json is different than cwd.
The command for finding rogue .yo-rc.json files
sudo find / -name .yo-rc.json
From yoeman getting started page appears the command:
yo doctor
In my case, $NODE_PATH (which in my case, Ubuntu 14.04, is defined in /etc/profile.d) isn't the same than npm root. Adding in npm root in $NODE_PATH solve the problem.
I have been trying to get yeoman to play nice with my vagrant box and this is what I had to do to install npm packages globally without sudo on ubuntu:
1. Create the directory to store global packages
$ mkdir "${HOME}/.npm-packages"
2. Tell npm where to put any packages installed globally
Insert this snippet into your ~/.npmrc file:
prefix=${HOME}/.npm-packages
3. Make sure that npm can locate installed binaries et cetera
Insert this snippet into your .bashrc/.zshrc:
NPM_PACKAGES="${HOME}/.npm-packages"
PATH="$NPM_PACKAGES/bin:$PATH"
// `unset` `manpath` to allow inheritance from `/etc/manpath` with
// the `manpath` command
unset MANPATH // remove this line if you have previously modified `manpath`
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
4. Run the following or restart terminal
$ source ~/.bashrc
Hope this helps anyone who finds themselves in a similar situation.

Resources