nodejs / node-gyp

Node.js native addon build tool
MIT License
9.95k stars 1.8k forks source link

Error while Installing SFDX lwc-server #2342

Open rahullyadav26 opened 3 years ago

rahullyadav26 commented 3 years ago

Hi, I am trying to install the SFDX local dev server but the plugin is throwing the below error. I already install the gpy but, the error still continues. Below is the Error !!

error /Users/rahulyadav/.local/share/sfdx/node_modules/fibers: Command failed. Exit code: 127 Command: node build.js || nodejs build.js Arguments: Directory: /Users/rahulyadav/.local/share/sfdx/node_modules/fibers Output: gyp info it worked if it ends with ok gyp info using node-gyp@7.1.2 gyp info using node@14.16.0 | darwin | x64 gyp info find Python using Python version 3.8.8 found at "/usr/local/bin/python3" gyp http GET https://nodejs.org/download/release/v14.16.0/node-v14.16.0-headers.tar.gz gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: ENOENT: no such file or directory, open '/Users/rahulyadav/‎⁨Macintosh' gyp ERR! stack at Object.openSync (fs.js:476:3) gyp ERR! stack at Object.readFileSync (fs.js:377:35) gyp ERR! stack at readCAFile (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:434:15) gyp ERR! stack at download (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:409:22) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:162:19 gyp ERR! stack at FSReqCallback.oncomplete (fs.js:171:23) gyp ERR! System Darwin 18.7.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /Users/rahulyadav/.local/share/sfdx/node_modules/fibers gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v7.1.2 gyp ERR! not ok node-gyp exited with code: 1 Please make sure you are using a supported platform and node version. If you would like to compile fibers on this machine please make sure you have setup your build environment-- Windows + OS X instructions here: https://github.com/nodejs/node-gyp Ubuntu users please run: sudo apt-get install g++ build-essential RHEL users please run: yum install gcc-c++ and yum groupinstall 'Development Tools' Alpine users please run: sudo apk add python make g++ /bin/sh: nodejs: command not found Installing plugin @salesforce/lwc-dev-server... failed Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:/Users/rahulyadav/.local/share/sfdx/yarn.lock --preferred-cache-folder=/Users/rahulyadav/Library/Caches/sfdx/yarn --check-files exited with code 127

Pls help me find the solution ??

leo-dcfa commented 3 years ago

Facing the exact same issue here using nvm/node lts (14.17.1)