oransel/node-talib

Installation error even after installing Windows Build Tools

jeongmincha opened this issue · 10 comments

building talib functions...
fs.js:904
  return binding.readdir(pathModule._makeLong(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.<anonymous> (C:\Users\jeongmincha\Dropbox\trading\gekko\node_modules\talib\src\lib\build.js:22:30)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! talib@1.0.4 install: `node ./src/lib/build.js && node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the talib@1.0.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jeongmincha\AppData\Roaming\npm-cache\_logs\2018-02-08T12_16_22_635Z-debug.log

Here's my error message.
What should I do to resolve this issue?
I already installed Windows Build Tools by using admin cmd and typing npm install --global --production windows-build-tools.

I'm on Windows 10.
node -v => v8.9.4
npm -v => v5.6.0

Are you on 64bit or 32bit OS?

I've got the exact same error on

64bit win 10
node 9.5.0
npm 5.6.0

you may be missing .NET framework

@oransel Yeah, I was able to figure out why I met this issue, but I don't know how to resolve this problem.
I knew installing windows-build-tools would solve this, but it didn't.
How can I get the missing .NET framework?

and your documentation says Windows users need only node js and windows-build-tools. But, you know, in my case, that was not. I think the documentation should contain other requirements.

cf. I am using Windows 10 Home 64bit.

https://docs.microsoft.com/en-us/dotnet/framework/install/on-windows-10

With Windows 10, .net framework is expected to be installed.

@oransel Thank you for your help, but I've decided to use your library on bash on Windows 10. It worked well on this platform.
Anyway, I recommend you write some explanations about this issue on the main README.

I managed to find a workaround for the issue without installing bash for Windows 10:

  1. Go to Control Panel -> Programs -> Turn Windows features on or off -> install ".NET Framework 3.5"
  2. Go to "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework"
  3. Create a folder named ".NETFramework"
  4. Copy the "v3.0" and "v3.5" in the newly created ".NETFramework" folder
  5. Try to run "npm install" once again.

Think this is an issue with the repo. It is looking for the framework to exist in an alternate location from where Windows 10 has it installed