batavia icon indicating copy to clipboard operation
batavia copied to clipboard

Put npm into the virtualenv (doc issue)

Open shaib opened this issue 8 years ago • 4 comments

I suspect this may be an improvement to workflow, at least for contributors: https://lincolnloop.com/blog/installing-nodejs-and-npm-python-virtualenv/

Amirite?

shaib avatar Dec 04 '16 14:12 shaib

Ooh - yes. And possibly even better, @elbaschid's virtual-node - a pip installable node.js.

freakboy3742 avatar Dec 05 '16 02:12 freakboy3742

(although from the look of it, that project might need an update...)

freakboy3742 avatar Dec 05 '16 02:12 freakboy3742

Haha, that's very true. I haven't used it myself for a while and since I'm mostly Python 3 now, it doesn't really work anymore 😢 . But I'm happy to push an update if that is just a version bump of node or something.

roadsideseb avatar Dec 06 '16 17:12 roadsideseb

I've been using nodeenv successfully. Although its docs say "python 2.6 or 2.7", it does support Python 3. nodeenv is itself pip-installable, and then you can use it to install node into the virtualenv using nodeenv -p.

Looking at virtual-node, it mentions nodeenv as a source which it adapted -- except it seems that nodeenv has advanced significantly since then, and virtual-node hasn't.

So, my "get started guide" says:

mkvirtualenv batavia
pip install nodeenv cricket
nodeenv -p
npm install
npm run build
cricket-unittest

shaib avatar Dec 25 '16 00:12 shaib