function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ajeeth Kumar SAjeeth Kumar S 

When i tried to instal LWC local development server in my Mac system i am getting below error. could please guide me to fix this issue

sudo sfdx plugins:install @salesforce/lwc-dev-server
Polling for new version(s) to become available on npm... done
    HTTPError: Response code 403 (Forbidden)
    Code: ERR_NON_2XX_3XX_RESPONSE
Best Answer chosen by Ajeeth Kumar S
Ajeeth Kumar SAjeeth Kumar S


Now i have installed LWC local development server in my mac system. I feel issue with salesforce server.

HI Vikalp Nagar, Can you please try now. 

All Answers

HarshHarsh (Salesforce Developers) 
Hi Ajeeth,

1. Installation of Nodejs software and disconnect from office network VPN (if connected).
2.  Install node-gyp by running 
      npm install -g node-gyp
    In the command prompt or whatever command-line interface you use.
3. And then after that, you can run 
     npm install --global --production windows-build-tools
4. Finally tried the below command it worked after a couple of times.
     sfdx plugins: install @salesforce/lwc-dev-server


Please mark it as Best Answer if the above information was helpful.

Thanks.

 
Ajeeth Kumar SAjeeth Kumar S

Thanks for this quick response but it's not work for me

when i tried to install this(npm install --global --production windows-build-tools) i am getting below error.

error:
npm WARN config production Use `--omit=dev` instead.
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for windows-build-tools@5.2.2: wanted {"os":"win32"} (current: {"os":"darwin"})
npm ERR! notsup Valid os:  win32
npm ERR! notsup Actual os: darwin

HarshHarsh (Salesforce Developers) 
Hi Ajeeth,
  • You can skip the 3rd step and before that please update sfdx and also, make sure you run
  • npm install -g node-gyp
If it works for you, do post an update here.

Please mark it as Best Answer if the above information was helpful.

Thanks.
 
Vikalp NagarVikalp Nagar
I am also having the same issue as Ajeet. It is not resolved even after following the steps mentioned above. Below are the terminal logs. Would really appreciate if someone can help.
 
PS C:\Users\2XX2\VSProjects\bikeCard> npm install -g node-gyp

changed 129 packages in 14s

17 packages are looking for funding
  run `npm fund` for details

PS C:\Users\2XX2\VSProjects\bikeCard> npm install --global --production windows-build-tools
npm WARN config production Use `--omit=dev` instead.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\2XX2\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\2XX2\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\verror'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\2XX2\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\verror'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\2XX2\AppData\Roaming\npm\node_modules\windows-build-tools
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./dist/index.js
Downloading python-2.7.15.amd64.msi
npm ERR! [============================================>] 100.0% (0 B/s)
npm ERR! Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\2XX2\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
npm ERR! [============================================>] 100.0% (0 B/s)
npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\2XX2\.windows-build-tools\vs_BuildTools.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm ERR!     at Function.defineProperty (<anonymous>)
npm ERR!     at Object.removePath (C:\Users\2XX2\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm ERR!     at Object.install (C:\Users\2XX2\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm ERR!     at C:\Users\2XX2\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR!     at async Object.aquireInstallers (C:\Users\2XX2\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm ERR!   code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm ERR! windows-build-tools will now exit.

npm ERR! A complete log of this run can be found in: C:\Users\2XX2\AppData\Local\npm-cache\_logs\2023-09-14T05_10_09_048Z-debug-0.log



PS C:\Users\2XX2\VSProjects\bikeCard> sfdx plugins:install @salesforce/lwc-dev-server 
Polling for new version(s) to become available on npm... done
    HTTPError: Response code 403 (Forbidden)
    Code: ERR_NON_2XX_3XX_RESPONSE
Ajeeth Kumar SAjeeth Kumar S


Now i have installed LWC local development server in my mac system. I feel issue with salesforce server.

HI Vikalp Nagar, Can you please try now. 

This was selected as the best answer
wp encipherwp encipher
Really all the previously mentioned answers are 90% correct, just give them a try please let me know here, and we will also try to help. VITPRESS (https://vitpress.com)