Closed suenot closed 11 years ago
Hm,,, I don't have node_modules folder, but have node.
suenot@acer:/usr/local/lib$ cd node_modules
bash: cd: node_modules: No such file or directory
suenot@acer:/usr/local/lib$ cd ~
suenot@acer:~$ yeoman
yeoman v0.9.6
Usage: yeoman [command] [task [task ...]]
Available commands supported by yeoman:
init Initialize and scaffold a new project using generator templates
build Build an optimized version of your app, ready to deploy
server Launch a preview server which will begin watching for changes
test Run a Mocha test harness in a headless PhantomJS
install Install a package from the clientside package registry
uninstall Uninstall the package
update Update a package to the latest version
list List the packages currently installed
search Query the registry for matching package names
lookup Look up info on a particular package
Certain commands such as init also provide further help via a --help flag
suenot@acer:~$ npm
Usage: npm <command>
where <command> is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache,
completion, config, ddp, dedupe, deprecate, docs, edit,
explore, faq, find, find-dupes, get, help, help-search,
home, i, info, init, install, isntall, la, link, list, ll,
ln, login, ls, outdated, owner, pack, prefix, prune,
publish, r, rb, rebuild, remove, restart, rm, root,
run-script, s, se, search, set, show, shrinkwrap, star,
start, stop, submodule, tag, test, tst, un, uninstall,
unlink, unpublish, unstar, up, update, version, view,
whoami
npm <cmd> -h quick help on <cmd>
npm -l display full usage info
npm faq commonly asked questions
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
/home/suenot/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
npm@1.1.69 /usr/lib/nodejs/npm
suenot@acer:~$
cd /usr/lib/node_modules/yeoman/node_modules/yeoman-generators/lib/generators Without /local dir in path in my case. Xubuntu 12.10.
Without /local dir in path in my case
Did you try cloning the repo in /usr/lib/node_modules/yeoman/node_modules/yeoman-generators/lib/generators
then?
It should work.
Xubuntu 12.10.
I made the install script based on Mac os, and never tested it on other platform. I should add a warning about that in the readme.
Yeoman server working. But doesn't working ./server
suenot@acer:~/Dropbox/sites$ python server.py
File "server.py", line 2
from yeoman-flask import yeoman-flask
^
SyntaxError: invalid syntax
I didn't set virtualenv in this folder, probably my problem now in this.
from yeoman-flask import yeoman-flask
The problem is the name you gave to your app. Try to use a name without hyphens (basically, following the python module name convention).
Set virtualenv in /Dropbox/sites/yf/, create app in /Dropbox/sites/yf/app/. But...
(yf)suenot@acer:~/Dropbox/sites/yf$ ls
app bin freeze.py Gruntfile.js include lib local server.py
(yf)suenot@acer:~/Dropbox/sites/yf$ python server.py
Traceback (most recent call last):
File "server.py", line 2, in <module>
from app import app
File "/home/suenot/Dropbox/sites/yf/app/__init__.py", line 1, in <module>
from flask import Flask, url_for
ImportError: No module named flask
(yf)suenot@acer:~/Dropbox/sites/yf$ sudo pip install flask
Requirement already satisfied (use --upgrade to upgrade): flask in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /usr/local/lib/python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/local/lib/python2.7/dist-packages (from flask)
Cleaning up...
So is this working now that you installed Flask?
Flask already installed. But print:
ImportError: No module named flask
If you have this error this is clearly because of the Flask installation. As you told me that you've set up a virtual env, you need to be sure that you installed Flask in this environment, and that you activate the environment when you try to run the python server.
I am closing this issue as it does not have something to do with the yeoman-flask generator. Maybe try posting on stackoverflow if you have problems with your virtual env / module installation.