Open IvanOnishchenko opened 3 years ago
Also I tried following next steps:
1. If you have not installed electron-rebuild just install it with the command: `npm i -D electron-rebuild`
2. Remove from the `node_modules` folder the `usb-detection` folder.
3. Remove the file `package-lock.json`, this is suggested for ensure a clean installation, but you can try first without remove it.
4. Run `npm i` to install non-installed modules.
5. And finally run `./node_modules/.bin/electron-rebuild`
$ ./node_modules/.bin/electron-rebuild
- Searching dependency tree
gyp info find Python using Python version 2.7.18 found at "C:\Python27\python.exe"
gyp info find VS using VS2017 (15.9.28307.1440) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python27\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\Администратор\\aslice-rekordbox\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Администратор\\aslice-rekordbox\\node_modules\\usb-detection\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Администратор\\aslice-rekordbox\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Администратор\\.electron-gyp\\12.0.1\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Администратор\\.electron-gyp\\12.0.1',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Администратор\\aslice-rekordbox\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\Администратор\\\\.electron-gyp\\\\12.0.1\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Администратор\\aslice-rekordbox\\node_modules\\usb-detection',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\Администратор\\aslice-rekordbox\\node_modules\\usb-detection\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\gyp_main.py", line 51, in <module>
sys.exit(gyp.script_main())
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 670, in script_main
return main(sys.argv[1:])
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 662, in main
return gyp_main(args)
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 647, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2132, in GenerateOutput
target_list, target_dicts, options, msvs_version
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1936, in _CreateProjectObjects
guid = _GetGuidOfProject(proj_path, spec)
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 985, in _GetGuidOfProject
guid = guid or MSVSNew.MakeGuid(proj_path)
File "C:\Users\▒▒▒▒▒▒▒▒▒▒▒▒▒\aslice-rekordbox\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 51, in MakeGuid
d = hashlib.md5((str(seed) + str(name)).encode("utf-8")).hexdigest().upper()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 17: ordinal not in range(128)
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\Администратор\aslice-rekordbox\node_modules\usb-detection'.
Error: `gyp` failed with exit code: 1
Error: node-gyp failed to rebuild 'C:\Users\Администратор\aslice-rekordbox\node_modules\usb-detection'.
Error: `gyp` failed with exit code: 1
at ModuleRebuilder.rebuildNodeGypModule (C:\Users\Администратор\aslice-rekordbox\node_modules\electron-rebuild\lib\src\module-rebuilder.js:193:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Rebuilder.rebuildModuleAt (C:\Users\Администратор\aslice-rekordbox\node_modules\electron-rebuild\lib\src\rebuild.js:190:9)
at async Rebuilder.rebuild (C:\Users\Администратор\aslice-rekordbox\node_modules\electron-rebuild\lib\src\rebuild.js:152:17)
at async C:\Users\Администратор\aslice-rekordbox\node_modules\electron-rebuild\lib\src\cli.js:146:9
Maybe you need to run through these steps: https://stackoverflow.com/a/51027262/796832 (from https://stackoverflow.com/a/51027262/796832)
I just Googled UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position
. I don't have any insight into building for Electron so Google will probably be a better resource here.
@IvanOnishchenko Same issue for me. Have you found a solution?
Same issues+1, though not for this project.
@IvanOnishchenko it looks like the issue you're describing is a problem with your computer's environment setup for compiling modules with node-gyp and has nothing to do with usb-detection.
I recommend you try out usb-detection@4.13.0
, which should have prebuilds available for electron-rebuild
to download, sidestepping your computer's problems using node-gyp. Additionally, it upgrades to a newer version of node-gyp
that can use Python 3 instead of Python 2. Given all of Python 2's string encoding problems, that could even be the source of your compilation issues
@IvanOnishchenko Issue's and steps reproduced here (with electron 13 and electron-builder).
Resolved only with the solution proposed by @mcous: downgrade the usb-detection ^4.14.0
to usb-detection@4.13.0
.
If I use Node 13 or 14, node install works well, but when I try to start app (node start) I get error:
But I don't see 87 version on nodej.org, 14 has 83 version, 15 has 88 version.
If I use Node 15, I get error while node install command running: