Eng-Elias / CrewAI-Visualizer

Interactive user interface for CrewAI package.
MIT License
279 stars 67 forks source link

node-gyp Trouble - Solved #3

Closed brettzky10 closed 5 months ago

brettzky10 commented 6 months ago

For node-gyp trouble

I spent way too long going down tangents getting node-gyp to build. If others on Windows are having trouble with node-gyp, here are some note worthy solutions:

To Solve:

make sure to replace any paths with your own

1) Go through the steps listed on node-gyp's Github: https://github.com/nodejs/node-gyp

2) Make sure you use 'Power Shell (admin)' or for VSStudio 'Developer VS Studio 2022 Command Prompt (admin)'

For error:

msvs_version does not match this version

make sure your msvs_version=2022 is matching the msvs version for node-gyp

npm config set msvs_version 2022

For error:

npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use

make sure you set the version and set the path of VSStudio ie. 2022 from VS Studio Installer then:

set environment variable path to VSStudio version: SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\

set msbuild path: npm config set msbuild_path = "C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe"

set python installation path: npm config set python = "c:\Python\311\python.exe"

For error:

does not match this Visual Studio Command Prompt

I had to avoid VSStudio's ContrainedLanguage mode for node-gyp to work https://github.com/microsoft/vssetup.powershell

If you are still having trouble, this issue for node-gyp has some tips: https://github.com/nodejs/node-gyp/issues/2552

Eng-Elias commented 6 months ago

Thank you for opening the issue with the solution. Excuse me, can I ask you: how did your get this issue in this project? Because I use Windows and I didn't face this issue and I also helped a normal user who uses Windows to install this project on his device and we didn't need node-gyp to setup or run CrewAI Visualizer.

brettzky10 commented 6 months ago

After npm i the 'node-calls-python' package installation fails with node-gyp error. The github for 'node-calls-python' suggests installing that latest version of node-gyp.

Eng-Elias commented 6 months ago

Ok, thanks for your notes.