forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Error running command sfdx plugins:install @salesforce/lwc-dev-server #112

Closed ganieany52 closed 3 years ago

ganieany52 commented 3 years ago

Describe the bug Receiving the below error when running the command sfdx plugins:install @salesforce/lwc-dev-server in the terminal

Output:
node-gyp not found! Please ensure node-gyp is in your PATH--
Try running: `sudo npm install -g node-gyp`
spawn node-gyp ENOENT
/bin/sh: nodejs: command not found
Installing plugin @salesforce/lwc-dev-server... failed

When I run the suggested command, it returns sudo: npm: command not found

Expected behavior Successful install

Desktop (please complete the following information):

Additional context Have tried on two separate machines with the same error

ganieany52 commented 3 years ago

Got it working by installing node.js https://nodejs.org/en/ and then running the command recommended in the error message sudo npm install -g node-gyp. Then when I ran sfdx plugins:install @salesforce/lwc-dev-server again my machine actually prompted me to install Xcode Command Line Tools. After installing that, I ran sfdx plugins:install @salesforce/lwc-dev-server one last time and it worked!

stale[bot] commented 3 years ago

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

uip-robot-zz commented 3 years ago

This issue has been linked to a new work item: W-9221648

smaddox-sf commented 3 years ago

Glad you were unblocked @ganieany52 ! Thanks for posting back with the details