balena-io-modules / drivelist

List all connected drives in your computer, in all major operating systems
Apache License 2.0
239 stars 90 forks source link

cannot install drivelist on windows 10 with python3 #345

Open remiglobal opened 5 years ago

remiglobal commented 5 years ago

Hi all,

i cannot install drivelist on my machine. attached is the debug log. have been looking at the other issue's answer like downgrading to version 5.0.0. I have downgraded, install was successful but got yaml error.

2019-07-16T02_15_26_172Z-debug.log

the yaml error after downgrading to 5.0.0

Uncaught YAMLException {name: "YAMLException", reason: "bad indentation of a sequence entry", mark: Mark, message: "bad indentation of a sequence entry at line 8, column 12:↵ - path: F:↵ ^", stack: "YAMLException: bad indentation of a sequence entry…de_modules\js-yaml\lib\js-yaml\loader.js:1618:10)"}mark: Mark {name: null, buffer: "device: "\\.\PHYSICALDRIVE1" ↵description: "WDC…False ↵mountpoints: ↵ - path: F: ↵ - path: G:

SimonEast commented 4 years ago

I'm getting issues installing on Windows 10 also. Different error...

if not defined npm_config_node_gyp (node "C:\Users\Simon\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Simon\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! stack Error: Command failed: C:\Users\Simon\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
lurch commented 4 years ago

I've no idea where that line of Python is coming from, but it's using the Python2 print syntax. For Python3 it'd need to be:

import sys; print("%s.%s.%s" % sys.version_info[:3]);
aaronaverill commented 4 years ago

Same issue. I see there's quite a long list of open issues. Has this project been abandoned? What a pity.

EDIT: The problem looks to be a dependency on node-gyp to compile native code which uses Python 2.7. Running this command in an Administrative console fixed my issue somewhat:

npm install --global --production windows-build-tools --vs2015

A longer explanation with additional troubleshooting at this article:

https://spin.atomicobject.com/2019/03/27/node-gyp-windows/

lurch commented 4 years ago

Has this project been abandoned?

AFAIK this repo is used by https://github.com/balena-io-modules/etcher-sdk which in turn is used by https://github.com/balena-io/etcher , but I dunno how much interest the developers have in maintaining this repo as a standalone project outside of the narrow Etcher context.

AIUI, if the prebuild binaries were up to date (see https://github.com/balena-io-modules/drivelist/issues/331 ) then npm would install those and node-gyp wouldn't be needed?

aaronaverill commented 4 years ago

AIUI, if the prebuild binaries were up to date (see #331 ) then npm would install those and node-gyp wouldn't be needed?

That's the idea. But the project should also be buildable. These details should be put in the readme file of the project since they are a build dependency for Windows.