Repository navigation
Closed
Description
Can't create environment on Windows, because it requires compiler.
E:\grtp.co>py -m nodeenv -v .vjs -n 4.2.1
* Install node (4.2.1)
Downloading https://nodejs.org/dist/v4.2.1/node-v4.2.1.tar.gz
.'.' is not recognized as an internal or external command,
operable program or batch file.
'.' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\nodeenv.py", line 1044, in <module>
main()
File "C:\Python27\lib\site-packages\nodeenv.py", line 892, in main
create_environment(env_dir, opt)
File "C:\Python27\lib\site-packages\nodeenv.py", line 733, in create_environment
install_node(env_dir, src_dir, opt)
File "C:\Python27\lib\site-packages\nodeenv.py", line 609, in install_node
build_node_from_src(env_dir, src_dir, node_src_dir, opt)
File "C:\Python27\lib\site-packages\nodeenv.py", line 574, in build_node_from_src
callit(conf_cmd, opt.verbose, True, node_src_dir, env)
File "C:\Python27\lib\site-packages\nodeenv.py", line 461, in callit
% (cmd_desc, proc.returncode))
OSError: Command ./configure "--prefix='E:\grtp.co\.vjs'" failed with error code 1
The only solution that comes into my mind is to use compiled binaries. I implemented this once for getting prerequisites for compiling Wesnoth. Perhaps this code can be reused here too:
Metadata
Metadata
Assignees
Labels
No labels
Activity
ekalinin commentedon Nov 3, 2015
Hi @techtonik
Thanks for report.
Yeah,
nodeenvdoesn't support Windows atm. (see #53)But
nodeenvis able to install node from compiled binaries.Try this command (i'm not sure if it works under windows though):
techtonik commentedon Nov 3, 2015
Nice. I'd switch to that option by default. Looks like problem with 32-bit Windows:
Add x86 arch for 32-bit Windows
techtonik commentedon Nov 3, 2015
Download for Windows fails, because Windows downloads have different URL structure.
https://nodejs.org/en/blog/release/v4.2.1/
msangel commentedon Feb 9, 2016
So far, please make --prebuilt mode as default on windows.
If someone wish to build node.js, let him specify this explicitly.
ekalinin commentedon Feb 9, 2016
I believe, we need to do it for all platforms :)
techtonik commentedon Feb 9, 2016
It would be nice to merge #148 before moving further into downloads refactoring for all systems. It should be pretty easy then to take it and finish it from there.
ekalinin commentedon Feb 9, 2016
Done
techtonik commentedon Feb 9, 2016
One step closer. He-he..
techtonik commentedon Feb 9, 2016
Another fix is in #149
techtonik commentedon Feb 9, 2016
Well, the code is there, but coverage test fails, probably because Windows execution branch is not tested on Travis.
neocris commentedon Feb 11, 2016
for me the keyerror is 'amd64' although i have a i5 core. please add support for amd64 arch. perhaps it has something to do with python for 64 bit versions since the intel 64 bit architecture was licensed from amd, therefore the 'amd64' key; the python binaries for 64 bit all have the amd64 denomination
techtonik commentedon Feb 11, 2016
@neocris what is the exact output of this command on your machine?
techtonik commentedon Feb 11, 2016
@neocris also, do you use latest Github version?
neocris commentedon Feb 11, 2016
@techtonik the output is "AMD64". i don't get the github question, neither have it installed. i installed nodeenv trough 'pip install' if that's what you mean
36 remaining items
techtonik commentedon Mar 4, 2016
@MCGallaspy installing from source is not an easy way. Easy way is to just download binaries, but it was reverted, because a4bf0e7 broke something on Linux.
techtonik commentedon Mar 4, 2016
@MCGallaspy try reverting code to revision MCGallaspy@cdbd415 to see what was made for prebuilt stuff. Basically
node.exeis downloaded and executed ok, but it appears thatnpmis also needed, which was just not implemented.MCGallaspy commentedon Mar 5, 2016
Tried
python -m nodeenv --prebuilt testfrom the given revision. The only contents of thetestdirectory is an emptysrcdirectory, and I get the following traceback:MCGallaspy commentedon Mar 5, 2016
It's because the parameter
node_urlindownload_node_srchas the valuehttps://nodejs.org/dist/v5.7.1/win-x64/node.exe-- which obviously is not a tar file.MCGallaspy commentedon Mar 5, 2016
Yeah, I see what you mean. Here's a work-in-progress: https://github.com/MCGallaspy/nodeenv/commits/windows-support-2
The command
python -m nodeenv --prebuilt testat least finishes without error, but somehow I haven't unpacked the node binary intotest\bin\node.exe(instead it goes totest\bin\node-<version>\node.exe) and also, as you say,npmbinary needs to be downloaded. Looks like you can get them here: https://github.com/npm/npm/releasesShort on time again, will try again later!
techtonik commentedon Mar 6, 2016
@MCGallaspy you're not testing the right revision - line 632 in your trace doesn't correspond to https://github.com/MCGallaspy/nodeenv/blob/cdbd41594a6ac57547cd3684de2faf5b946b4c25/nodeenv.py#L632
techtonik commentedon Mar 6, 2016
I see that https://github.com/MCGallaspy/nodeenv/commits/windows-support-2 branch is on top of needed fixes, so yes - need a way to download and install
npm, but the more pressing problem is to understand what had failed on Linux so that the changesets made so far were reverted in master branch.tylerlandas commentedon Apr 10, 2016
Hi all. Sorry if this is not the correct place to ask, but is nodeenv supported on 64bit Win10? From this thread it seems not yet, but want to confirm. Been trying to use it without success.
techtonik commentedon Apr 10, 2016
I don't have time/project to complete this, so it is not supported.
ekalinin commentedon Dec 8, 2016
#173
Windows - create Scripts dir if not exists
Do not fail if nodejs link can't be created on Windows
techtonik commentedon Jan 20, 2017
Can be closed for now. @ekalinin can you wrap a release with these changes?
ekalinin commentedon Jan 20, 2017
Done: