I want to create end point lib with this command
python lib/endpoints/endpointscfg.py get_client_lib java -bs src.service.mobile_api.MobileApi
but geting this error
from google.appengine.ext import vendor
ImportError: No module named appengine.ext
downlaod
google-cloud-sdk
https://cloud.google.com/sdk/docs/downloads-versioned-archives
it this folder in Document directory then
cd Document/google-cloud-sdk and run this command
./install.sh
after
gcloud components install app-engine-python
and update your lib directory with this command in your project like this
cd /project/
ls
lib src etc
sudo pip install -t lib google-endpoints
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 am having trouble getting Jenkins to use the "npm" command from the "Execute shell" (under the "Build" step).
I am attempting to set up a new Jenkins instance (a copy from a previous one). I just imported the old jobs and am now getting the various services that these jobs depend on (e.g. maven, nodejs, ansible etc.) installed.
I am having trouble getting nodejs and npm, in particular, set up.
When I type the command "npm install" on the command line, I get the following:
uws#9.14.0 install /var/lib/jenkins/workspace . . .
. . .
Binary is fine
added 1282 packages in 36.424s
When I then attempt to run the same command using the Jenkins execute shell, I get the following:
+ npm install
/tmp/jenkins7750702649955218109.sh: line 2: npm: command not found
Build step 'Execute shell' marked build as failure
Why would this command be accessible to me from the command line but not to Jenkins?
Some things I have checked:
-The path to "node" and "npm" are both on the path. At least "shortcuts" are on the path (this worked in the previous Jenkins instance).
-The node and npm binaries have root:root ownership, but their security settings are (currently) 755 (or -rwxr-xr-x).
-I have the nodejs plugin installed. Not sure of how to use it, but its settings match those on the previous Jenkins instance. Both instances use the execute shell (as opposed to any special Jenkins tool) to run the "npm" commands, whilst only the old version worked.
So, what else should I be checking that I am not? What does Jenkins require to access the "npm" command?
Try this below options in Jenkins
Option 1:
Option 2:
While attempting to follow the Appengine quickstart the following error message appears:
httplib2/__init__.py", line 352
print('%s:' % h, end=' ', file=self._fp)
^
SyntaxError: invalid syntax
I had the same issue but my solution was to run pip in a virtual environment for the correct Python version, in my case it was 2.7.
virtualenv --python=python2.7 .venv27
source .venv27/bin/activate
pip2.7 install -r requirements.txt -t lib
When installing google-api-python-client, the following is recommended:
pip install -t lib google-api-python-client
If this command is used in an enviornment running python 3, the lib installed copy will fail.
Better to explicily state pip2:
pip2 install -t lib google-api-python-client
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.