Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

#Trailhead Challenges2,399 discussing

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies.

I have installed 

sf plugins install @salesforce/lwc-dev-mobile

 

But when I am running this SFDX: Preview Component Locally. It asks me to install 

sfdx plugins install @salesforce/lwc-dev-server                   

 

When I try to install lwc-dev-server, I am getting the below error. 

 

These are my npm and node versions

Node and npm version 

arpan.banerjee@arpanba-ltm4vtt ~ % node -v 

v18.20.5

arpan.banerjee@arpanba-ltm4vtt ~ % npm -v 

10.8.2 

arpan.banerjee@arpanba-ltm4vtt ~ % 

 

I have installed npm install -g node-gyp.

 

npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.npm error code 127npm error path /Users/arpan.banerjee/.local/share/sf/node_modules/fibersnpm error command failednpm error command sh -c node build.js || nodejs build.jsnpm error CXX(target) Release/obj.target/fibers/src/fibers.onpm error gyp info it worked if it ends with oknpm error gyp info using node-gyp@11.0.0npm error gyp info using node@22.11.0 | darwin | arm64npm error gyp info find Python using Python version 3.13.1 found at "/opt/homebrew/opt/python@3.13/bin/python3.13"npm error gyp info spawn /opt/homebrew/opt/python@3.13/bin/python3.13npm error gyp info spawn args [npm error gyp info spawn args '/Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',npm error gyp info spawn args 'binding.gyp',npm error gyp info spawn args '-f',npm error gyp info spawn args 'make',npm error gyp info spawn args '-I',npm error gyp info spawn args '/Users/arpan.banerjee/.local/share/sf/node_modules/fibers/build/config.gypi',npm error gyp info spawn args '-I',npm error gyp info spawn args '/Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/node_modules/npm/node_modules/node-gyp/addon.gypi',npm error gyp info spawn args '-I',npm error gyp info spawn args '/Users/arpan.banerjee/Library/Caches/node-gyp/22.11.0/include/node/common.gypi',npm error gyp info spawn args '-Dlibrary=shared_library',npm error gyp info spawn args '-Dvisibility=default',npm error gyp info spawn args '-Dnode_root_dir=/Users/arpan.banerjee/Library/Caches/node-gyp/22.11.0',npm error gyp info spawn args '-Dnode_gyp_dir=/Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/node_modules/npm/node_modules/node-gyp',npm error gyp info spawn args '-Dnode_lib_file=/Users/arpan.banerjee/Library/Caches/node-gyp/22.11.0/<(target_arch)/node.lib',npm error gyp info spawn args '-Dmodule_root_dir=/Users/arpan.banerjee/.local/share/sf/node_modules/fibers',npm error gyp info spawn args '-Dnode_engine=v8',npm error gyp info spawn args '--depth=.',npm error gyp info spawn args '--no-parallel',npm error gyp info spawn args '--generator-output',npm error gyp info spawn args 'build',npm error gyp info spawn args '-Goutput_dir=.'npm error gyp info spawn args ]npm error gyp info spawn makenpm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]npm error ../src/fibers.cc:27:65: error: no member named 'kFinalizer' in 'v8::WeakCallbackType'npm error    27 |                 handle.SetWeak(val, WeakCallbackShim<F, P>, WeakCallbackType::kFinalizer);npm error       |                                                             ~~~~~~~~~~~~~~~~~~^npm error 1 error generated.npm error make: *** [Release/obj.target/fibers/src/fibers.o] Error 1npm error gyp ERR! build error npm error gyp ERR! stack Error: `make` failed with exit code: 2npm error gyp ERR! stack at ChildProcess.<anonymous> (/Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)npm error gyp ERR! System Darwin 24.2.0npm error gyp ERR! command "/Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/bin/node" "/Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"npm error gyp ERR! cwd /Users/arpan.banerjee/.local/share/sf/node_modules/fibersnpm error gyp ERR! node -v v22.11.0npm error gyp ERR! node-gyp -v v11.0.0npm error gyp ERR! not ok npm error node-gyp exited with code: 1npm error Please make sure you are using a supported platform and node version. If younpm error would like to compile fibers on this machine please make sure you have setup yournpm error build environment--npm error Windows + OS X instructions here: https://github.com/nodejs/node-gypnpm error Ubuntu users please run: `sudo apt-get install g++ build-essential`npm error RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'` npm error Alpine users please run: `sudo apk add python make g++`npm error sh: nodejs: command not foundnpm error A complete log of this run can be found in: /Users/arpan.banerjee/.npm/_logs/2025-01-03T10_52_27_535Z-debug-0.log@salesforce/cli: Installing plugin @salesforce/lwc-dev-server@latest... failed ›   Error: /Users/arpan.banerjee/.local/share/sf/client/2.70.7-b4edef3/node_modules/npm/bin/npm-cli.js install  ›   @salesforce/lwc-dev-server@latest --omit dev --no-audit --loglevel=notice --no-fund exited with code 127 ›   Try this: Run with DEBUG=@oclif/plugin-plugins* to see debug output.

Attaching the screenshot of the error-

 

Screenshot 2025-01-04 at 9.48.34 AM.png

 

 

#Trailhead Challenges

8 answers
  1. Jan 4, 5:46 AM

    Hi ,

     

    I was getting installation issues on my Mac as well. I finally figured the solution. SFDX CLI needs to be installed via NPM, and not directly with the installer. Also it is only Supported with Node V18. What I effectively did was:

    1. Remove SF CLI: Link
    2. Used NVM to install and use Node 18( As I already had a different version installed)
    3. Installed SFDX CLI via NPM: Link

    I tried installing the plugin and it installed successfully.

     

    https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UtRuK

0/9000
10 answers
  1. Sep 23, 2024, 11:17 AM

    @Mykhailo Vdovychenko my trailhead challenge is about "Deploy a Component That Lists Contacts"  which is the challenge given in the module "Use Apex to work with Data". I think the code you have provided me is relevant for the challenge in the module "Handle server errors". Please correct me if iam wrong.

0/9000