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
Kenny Godfried 7Kenny Godfried 7 

Issues trying to install live server.

Hello all,

I keep getting this when trying to install live server.
 
PS C:\Windows\system32> sfdx plugins:install @salesforce/lwc-dev-server
Successfully validated digital signature for @salesforce/lwc-dev-server.
Finished digital signature check.
warning @salesforce/lwc-dev-server > cpx > chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @salesforce/lwc-dev-server > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning @salesforce/lwc-dev-server > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning @salesforce/lwc-dev-server > cpx > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning @salesforce/lwc-dev-server > @webruntime/compiler > babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning @salesforce/lwc-dev-server > @webruntime/compiler > rollup-plugin-commonjs@9.3.4: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.
warning @salesforce/lwc-dev-server > @webruntime/compiler > rollup-plugin-node-resolve@4.2.4: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
warning @salesforce/lwc-dev-server > @webruntime/compiler > rollup-plugin-replace@2.2.0: This module has moved and is now available at @rollup/plugin-replace. Please update your dependencies. This version is no longer maintained.
warning @salesforce/lwc-dev-server > @webruntime/api > @lwc/compiler > rollup-plugin-replace@2.2.0: This module has moved and is now available at @rollup/plugin-replace. Please update your dependencies. This version is no longer maintained.
warning @salesforce/lwc-dev-server > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @salesforce/lwc-dev-server > @salesforce/core > jsforce > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @salesforce/lwc-dev-server > cpx > babel-runtime > core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning @salesforce/lwc-dev-server > jsdom > request > har-validator@5.1.5: this library is no longer supported
warning @salesforce/lwc-dev-server > cpx > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @salesforce/lwc-dev-server > cpx > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning "@salesforce/lwc-dev-server > request-promise-native@1.0.9" has unmet peer dependency "request@^2.34".
warning "@salesforce/lwc-dev-server > @rollup/plugin-alias@3.1.2" has unmet peer dependency "rollup@^1.20.0||^2.0.0".
warning "@salesforce/lwc-dev-server > request-promise-native > request-promise-core@1.1.4" has unmet peer dependency "request@^2.34".
error C:\Users\31622\AppData\Local\sfdx\node_modules\fibers: Command failed.
Exit code: 1
Command: node build.js || nodejs build.js
Arguments:
Directory: C:\Users\31622\AppData\Local\sfdx\node_modules\fibers
Output:
node-gyp not found! Please ensure node-gyp is in your PATH--
Try running: `sudo npm install -g node-gyp`
spawn node-gyp.cmd ENOENT
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
Installing plugin @salesforce/lwc-dev-server... failed
    Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive
    --mutex=file:C:\Users\31622\AppData\Local\sfdx\yarn.lock
    --preferred-cache-folder=C:\Users\31622\AppData\Local\sfdx\yarn --check-files exited with code 1


I have done everything you can think of.
  • Installled node-gyp
  • Uninstalled node and npm.
  • I checked the path and made sure node.js is there.

I don't know what else to do.

Any help?

 
AnudeepAnudeep (Salesforce Developers) 
Reading this Github post. Have you tried running the following commands?

Try running: `sudo npm install -g node-gyp` and sudo PATH="$PATH" node-gyp

 
Kenny GodfriedKenny Godfried
I found the fix in that Github post!

I had to run: npm install --global --production windows-build-tools

Thanks!!
AnudeepAnudeep (Salesforce Developers) 
Hi Kenny, 

If you have found the link I shared helpful, I appreciate if you can mark the answer as Best so that it helps others in the community facing the same issue. Thank You!
Priya NandhniPriya Nandhni
Hi Krenny,
   I am getting same error. Can you please let me know how to download node-gyp?Thanks in advance.

Thankyou!
Kenny GodfriedKenny Godfried
Hi Priya,

You need to install node gyp by running 
npm install -g node-gyp
in command prompt or whatever command line interface you use.
And then after that you run 
npm install --global --production windows-build-tools
That should fix the problem.


 
Atanu BhattacharyaAtanu Bhattacharya
Thanks Kenny! I faced the same issue and it got solved after running windows build tools.
Prashant Sharma 157Prashant Sharma 157
Hi All,

Still facing the issue, while using the below commands :

You need to install node gyp by running 
npm install -g node-gyp
in command prompt or whatever command line interface you use.
And then after that you run 
npm install --global --production windows-build-tools
That should fix the problem

getting below error


npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct 
and try again.
At line:1 char:1
+ npm install -g node-gyp
+ ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Rahul KajaleRahul Kajale
install node first, search google and install node, it comes with npm along
Amlan PatelAmlan Patel
Hi @Kenny Godfried 7

I tried 
npm install -g node-gyp
also this following command through Powershell 
npm install --global --production windows-build-tools
The commands were successful, however, on running the 'sfdx plugins:install @salesforce/lwc-dev-server', I am still facing issues like 
  • Python is not found
  • Node is not recognized as a command ( even though I have installed node and set path)
  • and more
Are there any other workarounds? Am I still missing something?
 
Pablo VasquezPablo Vasquez
Thanks, I also faced the same issue and it got solved after installing node gyp
npm install -g node-gyp

And running
npm install --global --production windows-build-tools

Just remember to close VSCode and open it again after making these steps
Suraj Tripathi 47Suraj Tripathi 47
Hi Kenny,

I found some solution and For this go to the power sale and apply this:

 npm install -g node-gyp


Agin apply this :

npm install --global --production windows-build-tools
 If you find your Solution then mark this as the best answer.

 

  Thank you!


  Regards,
  Suraj Tripathi 
Daniel BachvarovDaniel Bachvarov
Hi, the solution above did worked for me.
However when running $nmp install -g node-gyp command I hade some permission issues with write access to the /usr/local/lib/node_modules file.
I did used the following command to allow myself to to write in this dir $sudo chown -R $USER /usr/local/lib/node_modules

Thank you
Dan
Junior Bijetti 6Junior Bijetti 6
Try do this with the Power Shel (Administrator)
German Romano Alvarez 4German Romano Alvarez 4

I used Power Shell as administrator but I had this error:

npm install --global --production windows-build-tools
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
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.
[##################] | reify:xtend: http fetch GET 200 https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz 2394ms  (cache

I not understand what is the problem?












 

Deeksha Gaur 2Deeksha Gaur 2
@German Romano Alvarez 4 : Were able to find a solution to you problem as i am hitting exact same issue which installing production windows-build-tools via Admin Power Shell. Is there a workaround avaliable?
 
Shawn SonejaShawn Soneja
I ran into the same issue as the original poster, with a node-gyp error. The solution for me was to install the latest version of SFDX. I went from from 7.185.0 to 7.188.1, using sfdx update

This solved the issue for me, even when I was hitting errors with npm install --global --production windows-build-tools (the error with this command was TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor)