Unable to integrate my codebase to builder space

npm ERR! code 1

npm ERR! path C:\Users\builder-dqs\dqs-next\node_modules\isolated-vm

npm ERR! command failed

npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || (node-gyp rebuild --release -j max && node-gyp clean)

npm ERR! prebuild-install warn install unable to get local issuer certificate

npm ERR! gyp info it worked if it ends with ok

npm ERR! gyp info using node-gyp@10.0.1

npm ERR! gyp info using node@21.5.0 | win32 | x64

npm ERR! gyp info find Python using Python version 3.12.2 found at “C:\Users\AppData\Local\Programs\Python\Python312\python.exe”

npm ERR! gyp ERR! find VS

npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config

npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt

npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with ‘–loglevel silly’ for more details

npm ERR! gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18

npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8

npm ERR! gyp ERR! find VS

npm ERR! gyp ERR! find VS **************************************************************

npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio

npm ERR! gyp ERR! find VS including the “Desktop development with C++” workload.

npm ERR! gyp ERR! find VS For more information consult the documentation at:

npm ERR! gyp ERR! find VS

npm ERR! gyp ERR! find VS **************************************************************

npm ERR! gyp ERR! find VS

npm ERR! gyp ERR! configure error

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

npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\AppData\Roaming\nvm\v21.5.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:1

13:11)

npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\AppData\Roaming\nvm\v21.5.0\node_modules\npm\node_modules\node-gyp\lib\find-visua

lstudio.js:69:17)

npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

npm ERR! gyp ERR! stack at async createBuildDir (C:\Users\AppData\Roaming\nvm\v21.5.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:26)

npm ERR! gyp ERR! stack at async run (C:\Users\AppData\Roaming\nvm\v21.5.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)

npm ERR! gyp ERR! System Windows_NT 10.0.19045

npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” "C:\Users\AppData\Roaming\nvm\v21.5.0\node_modules\npm\node_modules\node-gyp\bi

n\node-gyp.js" “rebuild” “–release” “-j” “max”

npm ERR! gyp ERR! cwd C:\Users\DHL\repos\genai\builder-dqs\dqs-next\node_modules\isolated-vm

npm ERR! gyp ERR! node -v v21.5.0

npm ERR! gyp ERR! node-gyp -v v10.0.1

npm ERR! gyp ERR! not ok

getting this error on executing this commend npm init builder.io@latest

Hey @saif the error is related to the node-gyp build process, which requires certain prerequisites to be properly installed on your system. It looks like there might some installation issues with Python, Visual studio. I would recommend to go through following steps:

  • Install Python - from your logs I can see you have python installed. Make sure it is the correct version(node-gyp often works best with Python 2.7 or 3.x up to 3.9).

  • Install Visual Studio and the Desktop Development with C++ Workload -

    • Go to the Visual Studio downloads page to download Visual Studio Community Edition.
    • During installation, make sure to select the “Desktop development with C++” workload. This includes all necessary compilers and libraries needed by node-gyp.
  • Configure npm to Use the Correct Version of Visual Studio-
    Once Visual Studio is installed, you may need to configure npm to use the Visual Studio build tools. You can do this via the command line:

    npm config set msvs_version 2022 --global
    

    Replace 2022 with your installed Visual Studio version, such as 2017 or 2022.

  • Address the SSL/TLS Certificate Issue - set an npm configuration or by installing the correct certificates:

  • Clean npm Cache and Rebuild

    npm cache clean --force
    

    Then, try installing the package again:

    npm install
    
  • Retry Installation

    npm init builder.io@latest