• Daway Phantastic
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Before I forget these were the exact steps I took to finally make it work.

CLEAN UP
  • Clean up your current installations:
  • Delete Folders .sf  and .sfdx and local installation
  • Uninstall all your previous versions of node and python
FRESH INSTALL (NODE, PYTHON, NODE-GYP)
  1. Make sure you have Python 3 installed
    1. During NPM Install of Plugin, it will look for a version of Python installed, else it will fail
  2. Install NodeJS LTS 18
    1. Install Node-Gyp using NPM Install command (NPM comes with NodeJS)
    2. Otherwise, the NPM installation of the Plugin will automatically install NODE-GYP for you
Install SF CLI
  • Install SF CLI using NPM!!!!!!  not the stupid Windows MSI Installer
    • https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_npm
    • NPM is a two step process
      • Install .sfdx
      • Install .sf
TEST SF CLI
  • After you have installed .sf and .sfdx  (This will get you the latest version)
  • AUTHENTICATE an ORG
  • Test it by connecting to your Sandbox
    • If you can't authenticate using standard web login try this
      • sfdx force:auth:device:login --instanceurl <your custom or test.salesforce.com> --setdefaultusername
      • This will display a user code within the cmd window
      • Enter that Code after  you open 
      • YOU MUST Enter the URL that you started with
      • https://<The URL You specified above>/setup/connect in a browser
Now here is the FUN
Several repeat steps were needed

Step1: sfdx plugins:install @salesforce/lwc-dev-server 
  • This will fail with that stupid YARN Error Message
Step2: npm install -g @salesforce/lwc-dev-server
  • This will properly install Node-Gyp for you
  • It will also pass the python check sinced you installed it at the very beginning
  • gyp info it worked if it ends with ok
    gyp info using node-gyp@9.3.1
    gyp info using node@18.16.0 | win32 | x64
    gyp info find Python using Python version 3.11.3 found at "C:\Python311\python.exe"
  • But it will Burp about not having Visual Studio
    • 7756 error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
      7756 error gyp ERR! find VS looking for Visual Studio 2015
      7756 error gyp ERR! find VS - not found
      7756 error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
      7756 error gyp ERR! find VS 
      7756 error gyp ERR! find VS **************************************************************
      7756 error gyp ERR! find VS You need to install the latest version of Visual Studio
      7756 error gyp ERR! find VS including the "Desktop development with C++" workload.
    • NO PROBLEM 
    • RUN npm install --global windows-build-tools
      •  This will also FAIL, but it downsloads the VS17 exe file for you
      • This is saved in
      • C:\Users\your name\.windows-build-tools\vs_BuildTools.exe
      • Install it and MAKE SURE YOU Select
      • VS including the "Desktop development with C++" workload.
Step3: RUN IT AGAIN npm install -g @salesforce/lwc-dev-server
  • This time it will detect Python and the Version of Visual Studio 17
  • It will load all the packages with no errors, but the plug in is still not installed
  • you will see something like this
  • added 1218 packages, and changed 1 package in 7m
    102 packages are looking for funding
  • I ALMOST QUIT AT THIS POINT
Step4: RUN IT AGAIN the SFDX command PLUGIN again
  • sfdx plugins:install @salesforce/lwc-dev-server 
  • GOSH DARN IT - IT FINALLY Installed
    • @salesforce/lwc-dev-server... \ [2/4] Fetching packages...
      warning "@salesforce/lwc-dev-server > @rollup/plugin-alias@3.1.9" has unmet peer dependency "rollup@^1.20.0||^2.0.0".
      warning "@salesforce/lwc-dev-server > request-promise-native@1.0.9" has unmet peer dependency "request@^2.34".
      warning "@salesforce/lwc-dev-server > request-promise-native > request-promise-core@1.1.4" has unmet peer dependency "reqInstalling plugin @salesforce/lwc-dev-server... installed v2.11.0

In Summary
Python 3
Nodejs 18 LTS
Visual Studio 17 and Desktop Build
Multiple Plug-in Install steps
(See my step by step above)

 

Anyways, I HOPE THIS IS Useful, because I scoured the internet for answers.  TRUST ME.  All the answers had some truth, but none worked for me.  UNTIL THIS DAY!!!!!