-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install issues and post-installation exceptions on Windows 10 #173
Comments
And here's the solution: Namely: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator). |
Unfortunately, when doing this: const BluetoothSerialPort = require('bluetooth-serial-port'); I get: C:\Shared\TalkBack\Dev\Bluetooth>node index.js Error: %1 is not a valid Win32 application. |
Does the file In the FAQ labelled issues you can find information on common Windows installation issues. |
The file C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node exists Note \Release\ as opposed to \Debug\ |
There is your problem. It should be compiled into |
It is compiled into Release when I use npm install. The thing is, that later I opened C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\binding.sln and produced a Debug build as well. So we've got both C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node produced by npm install, and C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Debug\BluetoothSerialPort.node But the issue still exists. |
Ok, understood. You might want to check if it is compiled as a 32 bits binary (like the error message indicates). You may also want to check if you have the problem with the LTS version of Node (currently v8) instead of v9. |
It's compiled as 64-bit binary. Can you describe how to check for the 2nd part? |
After changing build configuration and recompiling as 32-bit (both Debug and Release), I get the following error message: C:\Shared\TalkBack\Dev\Bluetooth>node index.js Error: Could not locate the bindings file. Tried: |
Hm... my apologies. The .node files never get built when platform target is switched to Win32. Here's the build log for Release build: 1>------ Rebuild All started: Project: BluetoothSerialPort, Configuration: Release Win32 ------ Here's the same for Debug build: 1>------ Rebuild All started: Project: BluetoothSerialPort, Configuration: Debug Win32 ------ |
The thing is that the windows support is community contributed and I cannot test it myself. If I look at the automatic build script we use |
Maybe the logs from the automated builds are helpful: https://ci.appveyor.com/project/eelcocramer/node-bluetooth-serial-port |
Tried npm install bluetooth-serial-port with VS2015 developer command prompt. Got this: C:\Shared\TalkBack\Dev\BluetoothVS2015>node index.js Error: %1 is not a valid Win32 application. Here's the log: C:\Shared\TalkBack\Dev\BluetoothVS2015>npm install bluetooth-serial-port
C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
|
Tried building with VS2015, configuring Win32 platform. Got this: https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(LNK1112)&rd=true LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Perhaps this supports only 32-bit versions of node.exe ? |
Maybe. The automatic build seems to work with both 32 as 64 bits versions but it looks like the module compiles to 32 bits. |
I've changed the automated build configuration to include more recent versions of node and to use VS2017. On the build server everything seems to build fine: https://ci.appveyor.com/project/eelcocramer/node-bluetooth-serial-port/build/1.0.177 I've created an issue (#174) to included pre-build binaries in published versions of this module. That may be more friendly to users. Do not expect this to be available soon though. |
Install fails for me with:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'bluetooth-serial-port' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 61f152799112b18e
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/bluetooth-serial-port 421ms (from cache)
8 silly pacote tag manifest for bluetooth-serial-port@latest fetched in 489ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule [email protected] checking installable status
14 http fetch GET 304 https://registry.npmjs.org/bindings 84ms (from cache)
15 silly pacote range manifest for [email protected] fetched in 88ms
16 silly resolveWithNewModule [email protected] checking installable status
17 http fetch GET 304 https://registry.npmjs.org/nan 235ms (from cache)
18 silly pacote tag manifest for nan@latest fetched in 239ms
19 silly resolveWithNewModule [email protected] checking installable status
20 http fetch GET 304 https://registry.npmjs.org/@types%2fnode 1007ms (from cache)
21 silly pacote range manifest for @types/node@^7.0.10 fetched in 1012ms
22 silly resolveWithNewModule @types/[email protected] checking installable status
23 silly currentTree [email protected]
23 silly currentTree
-- [email protected] 24 silly idealTree [email protected] 24 silly idealTree +-- @types/[email protected] 24 silly idealTree +-- [email protected] 24 silly idealTree +-- [email protected] 24 silly idealTree +-- [email protected] 24 silly idealTree
-- [email protected]25 silly install generateActionsToTake
26 silly diffTrees action count 4
27 silly diffTrees add @types/[email protected]
28 silly diffTrees add [email protected]
29 silly diffTrees add [email protected]
30 silly diffTrees add [email protected]
31 silly decomposeActions action count 32
32 silly decomposeActions fetch @types/[email protected]
33 silly decomposeActions extract @types/[email protected]
34 silly decomposeActions preinstall @types/[email protected]
35 silly decomposeActions build @types/[email protected]
36 silly decomposeActions install @types/[email protected]
37 silly decomposeActions postinstall @types/[email protected]
38 silly decomposeActions finalize @types/[email protected]
39 silly decomposeActions refresh-package-json @types/[email protected]
40 silly decomposeActions fetch [email protected]
41 silly decomposeActions extract [email protected]
42 silly decomposeActions preinstall [email protected]
43 silly decomposeActions build [email protected]
44 silly decomposeActions install [email protected]
45 silly decomposeActions postinstall [email protected]
46 silly decomposeActions finalize [email protected]
47 silly decomposeActions refresh-package-json [email protected]
48 silly decomposeActions fetch [email protected]
49 silly decomposeActions extract [email protected]
50 silly decomposeActions preinstall [email protected]
51 silly decomposeActions build [email protected]
52 silly decomposeActions install [email protected]
53 silly decomposeActions postinstall [email protected]
54 silly decomposeActions finalize [email protected]
55 silly decomposeActions refresh-package-json [email protected]
56 silly decomposeActions fetch [email protected]
57 silly decomposeActions extract [email protected]
58 silly decomposeActions preinstall [email protected]
59 silly decomposeActions build [email protected]
60 silly decomposeActions install [email protected]
61 silly decomposeActions postinstall [email protected]
62 silly decomposeActions finalize [email protected]
63 silly decomposeActions refresh-package-json [email protected]
64 silly install executeActions
65 silly doSerial global-install 32
66 verbose correctMkdir C:\Users\ilya7\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing
67 verbose lock using C:\Users\ilya7\AppData\Roaming\npm-cache_locks\staging-e092d313b88618f9.lock for C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging
68 silly doParallel extract 32
69 silly extract @types/[email protected]
70 silly pacote trying @types/node@https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz by hash: sha512-jjpyQsKGsOF/wUElNjfPULk+d8PKvJOIXk3IUeBYYmNCy5dMWfrI+JiixYNw8ppKOlcRwWTXFl0B+i5oGrf95Q==
71 silly extract [email protected]
72 silly pacote trying bindings@https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz by hash: sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=
73 silly extract [email protected]
74 silly pacote trying nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz by hash: sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=
75 silly extract [email protected]
76 silly pacote trying bluetooth-serial-port@https://registry.npmjs.org/bluetooth-serial-port/-/bluetooth-serial-port-2.1.5.tgz by hash: sha1-BX3dkMSYzfjRHjqOkADDmLH45XQ=
77 silly pacote bindings@https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging\bindings-4ec019bc by content address 84ms
78 silly pacote @types/node@https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging@types\node-cc34445d by content address 102ms
79 silly pacote nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging\nan-7b06c1c8 by content address 160ms
80 silly pacote bluetooth-serial-port@https://registry.npmjs.org/bluetooth-serial-port/-/bluetooth-serial-port-2.1.5.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging\bluetooth-serial-port-6438b315 by content address 160ms
81 silly doReverseSerial unbuild 32
82 silly doSerial remove 32
83 silly doSerial move 32
84 silly doSerial finalize 32
85 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules@types\node
86 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings
87 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules\nan
88 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port
89 silly doParallel refresh-package-json 32
90 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules@types\node
91 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings
92 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules\nan
93 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port
94 silly doParallel preinstall 32
95 silly preinstall @types/[email protected]
96 info lifecycle @types/[email protected]
preinstall: @types/[email protected]preinstall: [email protected]97 silly preinstall [email protected]
98 info lifecycle [email protected]
99 silly preinstall [email protected]
100 info lifecycle [email protected]
preinstall: [email protected]preinstall: [email protected]101 silly preinstall [email protected]
102 info lifecycle [email protected]
103 silly doSerial build 32
104 silly build @types/[email protected]
105 info linkStuff @types/[email protected]
106 silly linkStuff @types/[email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
107 verbose linkBins @types/[email protected]
108 verbose linkMans @types/[email protected]
109 silly build [email protected]
110 info linkStuff [email protected]
111 silly linkStuff [email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
112 verbose linkBins [email protected]
113 verbose linkMans [email protected]
114 silly build [email protected]
115 info linkStuff [email protected]
116 silly linkStuff [email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
117 verbose linkBins [email protected]
118 verbose linkMans [email protected]
119 silly build [email protected]
120 info linkStuff [email protected]
121 silly linkStuff [email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
122 verbose linkBins [email protected]
123 verbose linkMans [email protected]
124 silly doSerial global-link 32
125 silly doParallel update-linked 32
126 silly doSerial install 32
127 silly install @types/[email protected]
128 info lifecycle @types/[email protected]
install: @types/[email protected]install: [email protected]129 silly install [email protected]
130 info lifecycle [email protected]
131 silly install [email protected]
132 info lifecycle [email protected]
install: [email protected]install: [email protected]133 silly install [email protected]
134 info lifecycle [email protected]
135 verbose lifecycle [email protected]
install: unsafe-perm in lifecycle trueinstall: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\node_modules.bin;C:\Shared\TalkBack\Dev\Bluetooth\node_modules.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools;C:\code\depot_tools;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin;C:\ProgramData\Oracle\Java\javapath;c:\Windows\System32\wbem;C:\Local\Programs\Python\Python35\Scripts;C:\Local\Programs\Python\Python35;C:\Program Files (x86)\WinSCP;C:\Program Files\PuTTY;C:\Program Files (x86)\Skype\Phone;C:\Local\Programs\Perl\c\bin;C:\Local\Programs\Perl\perl\site\bin;C:\Local\Programs\Perl\perl\bin;C:\Program Files\dotnet;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft Emulator Manager\1.0;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\tools\go\bin;C:\Program Files (x86)\PDFtk\bin;C:\Program Files\CMake\bin;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts;C:\ProgramData\Anaconda3\Library\bin;C:\Program Files\Git\cmd;C:\Chromium\src\depot_tools;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Xoreax\IncrediBuild;C:\Program Files\nodejs;C:\Code\depot_tools;C:\Ruby23-x64\bin;C:\Users\ilya7.dnx\bin;C:\Users\ilya7\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\ilya7\AppData\Roaming\Composer\vendor\bin;c:\Program Files\git\bin;C:\local\programs\cmdline;C:\Program Files (x86)\PostgreSQL Frontend\bin;c:\local\Programs\CmdLine;c:\windows\system32;c:\Program Files (x86)\PHP\v5.6;C:\Users\ilya7\AppData\Local\Programs\Fiddler;C:\Users\ilya7\AppData\Local\Microsoft\WindowsApps;C:\tools\mingw64\bin;C:\Chromium\src\depot_tools;C:\Users\ilya7\AppData\Roaming\npm136 verbose lifecycle [email protected]
137 verbose lifecycle [email protected]
install: CWD: C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-portinstall: Args: [ '/d /s /c', 'node-gyp configure build' ]138 silly lifecycle [email protected]
139 silly lifecycle [email protected]
install: Returned: code: 1 signal: nullinstall: Failed to exec install script140 info lifecycle [email protected]
141 verbose unlock done using C:\Users\ilya7\AppData\Roaming\npm-cache_locks\staging-e092d313b88618f9.lock for C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging
142 silly saveTree [email protected]
142 silly saveTree +-- [email protected]
142 silly saveTree | +-- @types/[email protected]
142 silly saveTree | +-- [email protected]
142 silly saveTree |
-- [email protected] 142 silly saveTree
-- [email protected]143 warn [email protected] No description
144 warn [email protected] No repository field.
145 verbose stack Error: [email protected] install:
node-gyp configure build
145 verbose stack Exit status 1
145 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
145 verbose stack at EventEmitter.emit (events.js:160:13)
145 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
145 verbose stack at ChildProcess.emit (events.js:160:13)
145 verbose stack at maybeClose (internal/child_process.js:943:16)
145 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
146 verbose pkgid [email protected]
147 verbose cwd C:\Shared\TalkBack\Dev\Bluetooth
148 verbose Windows_NT 10.0.16299
149 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "bluetooth-serial-port"
150 verbose node v9.4.0
151 verbose npm v5.6.0
152 error code ELIFECYCLE
153 error errno 1
154 error [email protected] install:
node-gyp configure build
154 error Exit status 1
155 error Failed at the [email protected] install script.
155 error This is probably not a problem with npm. There is likely additional logging output above.
156 verbose exit [ 1, true ]
The text was updated successfully, but these errors were encountered: