stoefln / node-native-ocr

Other
19 stars 11 forks source link

Prerequisites for installing / building under Windows 10 #7

Open LGA opened 3 years ago

LGA commented 3 years ago

When trying to install under Windows I got stuck several times. There seem to be unmet dependencies around Visual Studio, Microsoft Build Tools and node-gyp. However, I could not set up my local environment to successfully run the build.

What I did so far:

Windows build tools got stuck on the loading of Python 2.7.15 [ https://github.com/felixrieseberg/windows-build-tools/issues/147 ]

After that I removed previously installed Python 2.7 and the node_modules folder from the project. But the build tools got stuck again after completing the python install.

When trying to run the install at this point it gave me: MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [ https://stackoverflow.com/questions/41695251/c-microsoft-cpp-default-props-was-not-found ]

Went ahead and installed Visual Studio 2019 CE (only C++ Packages for Desktop Applications)

After that the installation was running for a while, until it hit the following:

node-native-ocr>if not defined npm_config_node_gyp (node "C:\Users\loco\AppData\Roaming\nvm\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\loco\AppData\Roaming\nvm\v11.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19) gyp ERR! stack at onErrorNT (internal/child_process.js:429:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:81:17) gyp ERR! System Windows_NT 10.0.19043 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\loco\\AppData\\Roaming\\nvm\\v11.15.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd c:\Repos\repeato-studio\node_modules\node-native-ocr gyp ERR! node -v v11.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! This is a bug innode-gyp. gyp ERR! Try to update node-gyp and file an Issue if it does not help:

Uninstalling node-gyp manually and restarting the process resulted in the same outcome again.

As stated before, I don't fully understand what kind of requirements / dependencies the installation needs. Any hint is greatly appreciated.