sqlanywhere / node-sqlanywhere

SAP SQL Anywhere Database Client for Node
Apache License 2.0
38 stars 36 forks source link

Unable to add package on Windows #34

Open Pyroglyph opened 5 years ago

Pyroglyph commented 5 years ago

I'm trying to install the package with npm i sqlanywhere --verbose and it fails with this message:

> sqlanywhere@1.0.24 install C:\src\my-project\node_modules\sqlanywhere
> node build.js

Looking for binaries...
Trying to build binaries
Error when executing node-gyp configure
npm verb lifecycle sqlanywhere@1.0.24~install: unsafe-perm in lifecycle true
npm verb lifecycle sqlanywhere@1.0.24~install: PATH: C:\Users\<redacted>\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\src\my-project\node_modules\sqlanywhere\node_modules\.bin;C:\src\my-project\node_modules\.bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\SQL Anywhere 16\bin64;C:\Program Files\SQL Anywhere 16\bin32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\SQL Anywhere 17\bin64;C:\Program Files\SQL Anywhere 17\bin32;C:\Program Files\PuTTY\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64;C:\Users\<redacted>\.cargo\bin;C:\Users\<redacted>\.windows-build-tools\python27\;C:\Users\<redacted>\AppData\Local\Microsoft\WindowsApps;C:\Users\<redacted>\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\<redacted>\.dotnet\tools;C:\Users\<redacted>\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64;
npm verb lifecycle sqlanywhere@1.0.24~install: CWD: C:\src\my-project\node_modules\sqlanywhere
npm info lifecycle sqlanywhere@1.0.24~install: Failed to exec install script
npm timing action:install Completed in 7787ms
npm verb unlock done using C:\Users\<redacted>\AppData\Roaming\npm-cache\_locks\staging-0066b2f9f6a5f7f0.lock for C:\src\my-project\node_modules\.staging
npm timing stage:rollbackFailedOptional Completed in 197ms
npm timing stage:runTopLevelLifecycles Completed in 12485ms
npm WARN my-project@1.0.0 No description
npm WARN my-project@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64

npm verb stack Error: sqlanywhere@1.0.24 install: `node build.js`
npm verb stack Exit status 4294967295
npm verb stack     at EventEmitter.<anonymous> (C:\Users\<redacted>\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
npm verb stack     at EventEmitter.emit (events.js:200:13)
npm verb stack     at ChildProcess.<anonymous> (C:\Users\<redacted>\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
npm verb stack     at ChildProcess.emit (events.js:200:13)
npm verb stack     at maybeClose (internal/child_process.js:1021:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm verb pkgid sqlanywhere@1.0.24
npm verb cwd C:\src\my-project
npm verb Windows_NT 10.0.17134
npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\<redacted>\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "--verbose"
npm verb node v12.4.0
npm verb npm  v6.11.3
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! sqlanywhere@1.0.24 install: `node build.js`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the sqlanywhere@1.0.24 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 4294967295, true ]
npm timing npm Completed in 13497ms

Node version: 12.4.0 NPM version: 6.11.3 Python version: 2.7.15

DanCummins-SAP commented 4 years ago

Hello Connor,

I see you are using node v12 which is not supported by the driver at this time.

Node v12 changed the support for node-gyp significantly (it may no longer be available). If you could fall back to Node 10 (or 11) that should get around the problem you are seeing.

Note that even in Node 10, on Windows node-gyp support needs to be set up (you need Visual Studio and Python27, to support the node-gyp system).

I will report the issue of the missing node 12 support to the reponsible team at SAP.

Kind regards, Dan

renaud-sc commented 4 years ago

Hi, Is there a chance the SAP team update their driver to run on Node 12 ? Best regards, Renaud

CharlesDeJager commented 4 years ago

Can we maybe get feedback on this please. 8 months with no response is not acceptable.

DanCummins-SAP commented 4 years ago

Hi all,

Adding support for newer node distributions is on our list - we expect it to come next year. I apologize if this is not the answer the community was hoping for.

Dan