Skip to content
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

Windows fresh build fails #44

Closed
rodrigorhas opened this issue Jan 29, 2019 · 4 comments
Closed

Windows fresh build fails #44

rodrigorhas opened this issue Jan 29, 2019 · 4 comments

Comments

@rodrigorhas
Copy link

rodrigorhas commented Jan 29, 2019

As the title says, for about the last 3 hours (yup, this time) i was trying to do a simple npm install and i cannot get it to work due to:

  • MSBuild Cpp errors (file is missing, may be a bug from executable)
  • Python is required (v2.7 but not up to v3) to build robotjs
  • and other weird issues related to the items above

I can't put the error messages here because i already solved some of them and i lost the error messages...

So, i thing all the issues i've got was related only to robotjs build.
Is there a way to skip this build process or even make it easier?

UPDATE 1

i've just found some errors reported by the npm install

  • MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0"
  • C:\wamp64\www\colorpicker\node_modules\robotjs\build\robotjs.vcxproj(20,3): error MSB4019: The imported project "C:\Mic
    rosoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the fil
    e exists on disk.
  • gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax
    • this throws when i try to use python 3+ version
@Toinane
Copy link
Owner

Toinane commented Jan 29, 2019

Hey! Thanks for your issue!
yeah I'll need to make a documentation on how to compile colorpicker on local..

The delicate part is related to native module like robotjs, win-mouse and osx-mouse.
For windows, you have to :

  • install windows-build-tools npm package (npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe)
  • install node-gyp npm install -g node-gyp

Make sure you use a newer version of NodeJS like NodeJS 8 or NodeJS 10. The installation is not expected to work with a previous version like NodeJS 6

when you run npm install, it should just install all dependencies, you'll need to run npm run rebuild, this command will rebuild all native modules for the version of Electron Colorpicker use.

If it doesn't work again, I don't know if it can help but I've installed Visual Studio with all its options proposed during installation on my Windows

@Toinane Toinane self-assigned this Jan 29, 2019
@rodrigorhas
Copy link
Author

Damn. This is so annoying. I'll give it a try later and I'll report back if your "recipe" is right haha 😀

@Toinane
Copy link
Owner

Toinane commented Jan 29, 2019

Yeah sorry 😞It's not so easy to add native module into Electron project.. And I need it to make picker work.

@Toinane
Copy link
Owner

Toinane commented May 5, 2020

For this issue, I'll update the readme with more informations. Since I'll change the picker feature in next update, this will be more easier to build for development 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants