Error: yarn add #salesforce/lwc-dev-server#latest --non-interactive - npm

While Trying to install LWC local Server , getting this error then using this command
sfdx plugins:install #salesforce/lwc-dev-server
Tried applying all available community help but issue is still the same , tried restalling everything but no fix , please if someone can help then please help
This is the error Output :
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#9.3.0
gyp info using node#18.12.1 | win32 | x64
gyp info find Python using Python version 3.11.0 found at "C:\Users\nadee\AppData\Local\Programs\Python\Python311\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack at C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\find-visualstudio.js:369:14)
gyp ERR! stack at C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack at C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\find-visualstudio.js:390:16
gyp ERR! stack at C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
gyp ERR! System Windows_NT 10.0.22621
gyp ERR! command "C:\Users\nadee\AppData\Local\sfdx\client\7.180.0-d902059\bin\node.exe" "C:\Users\nadee\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\nadee\AppData\Local\sfdx\node_modules\fibers
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v9.3.0
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++
'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\nadee\AppData\Local\sfdx\yarn.lock
--preferred-cache-folder=C:\Users\nadee\AppData\Local\sfdx\yarn --check-files exited with code 1
LWC local server installation

Related

MDC 101 Material Design Tutorial throwing error when npm install starter

I was thinking of getting started with material.io tutorials
I downloaded the starter pack from https://codelabs.developers.google.com/codelabs/mdc-101-web#1
but Its showing error after hitting npm install
I can't understand the error :
C:\Users\hp\Desktop\Material\materialdesign\abc\mdc-101\starter>npm install
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure
binaries. Upgrade to fsevents 2.
> fibers#4.0.3 install C:\Users\hp\Desktop\Material\materialdesign\abc\mdc-
101\starter\node_modules\fibers
> node build.js || nodejs build.js
C:\Users\hp\Desktop\Material\materialdesign\abc\mdc-101\starter\node_modules\fibers>if not defined
npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-
gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2017 (15.9.28307.1440) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v141
gyp ERR! find VS - missing any Windows SDK
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-
visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-
visualstudio.js:70:14
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-
visualstudio.js:372:16
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-
gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\hp\Desktop\Material\materialdesign\abc\mdc-101\starter\node_modules\fibers
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
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++`
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7
(node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers#4.0.3 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#4.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Roaming\npm-cache\_logs\2021-04-15T08_25_49_219Z-debug.log
I don't understand why its referring to Visual Studio when it has nothing to do with the IDE.
PS: My visual studio code is completely up to date.
It needs VC, not for IDE, but for the toolchain. Some modules require to be built into a proper native addon and be native binary. I think sometimes maintainers provide a way to get pre-built binaries for some OSs, but if it's not prebuilt, then it has to be built locally, for that you need a real toolchain. So you Visual Studio Build Tools for that.
Did you follow the link from the error message?
https://github.com/nodejs/node-gyp#on-windows
If you would follow the tutorial on the same OS, as it was designed for, it might have been a less painful experience, so that's might be a surprise for you. Often developers even forget that they depend on something which depends on something else which is a native addon.

trouble download npm package

Trying to download the dominos api package but keep getting this error. I have tried downloading the .NET framework 2.0 SDK but it stil isnt letting me download this. What am I missing?
$ npm i dominos
> node-expat#2.3.16 install C:\Users\engqu\Desktop\app\node_modules\node-expat
> node-gyp rebuild
C:\Users\engqu\Desktop\app\node_modules\node-expat>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\Users\engqu\Desktop\app\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\libexpat\version.c
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\engqu\Desktop\app\node_modules\node-expat\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\engqu\Desktop\app\node_modules\node-expat
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-expat#2.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\engqu\AppData\Roaming\npm-cache\_logs\2018-07-29T08_12_30_456Z-debug.log
Did you try to install windows-build-tools? To install you need (as administrator in console):
npm install -g --production windows-build-tools

error with npm install hubot-irc on windows 10 x64

npm install error
I tried to install a hubot adapter hubot-irc for my own bot, but got an error with npm install:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not fi
nd WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versio
n number. [F:\Skitta\Documents\GitHub\mybot-irc\node_modules\hubot-irc\node_modules\irc\node_modules\iconv\build\libico
nv.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [F:\Skitta\Documents\Gi
tHub\mybot-irc\node_modules\hubot-irc\node_modules\irc\node_modules\iconv\build\libiconv.vcxproj]```
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2
69:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuil
d"
gyp ERR! cwd F:\Skitta\Documents\GitHub\mybot-irc\node_modules\hubot-irc\node_modules\irc\node_modules\iconv
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing node-icu-charset-detector#0.0.7
npm WARN optional dep failed, continuing iconv#2.1.11
how to fix it?
node-gyp is the likely culprit as it's used to build native dependencies. It's not obvious but it probably needs to be configured. Follow the notes for Windows install and take special note of your version of Windows and the all Windows versions section.

Unable to build c++ application using nw-gyp build. Error: error MSB6006: "CL.exe" exited with code -1073741515

I have tried to set up nw-gyp on Windows 8.1 x64 by following the following link:
nw-gyp installation guide
For this I installed:
Python v2.7
Node v4.2.2 (Setted its path too in environment variable)
npm v2.14.7
node-webkit v0.12.3
Microsoft Visual Studio C++ 2012 for Windows Desktop Express version From Here
after this I installed nw-gyp using the following command.
npm install -g nw-gyp
Now I tried to run the demo app provided here nw-gyp Example
Now I configure the app using command:
nw-gyp configure --target=0.12.3
0.12.3 is my node webkit version. The configuration is successful and I am able to get the build folder. But further when I try to build the addon using command
nw-gyp build
I get the following error
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.targets(146,5): error MSB6006: "CL.exe" exited with code -1073741515. [E:\PacificCX\testSecond\build\binding.vcxproj]
Here is the full log:
E:\PacificCX\testSecond>nw-gyp build
gyp info it worked if it ends with ok
gyp info using nw-gyp#0.12.4
gyp info using node#4.2.2 | win32 | x64
(node) child_process: options.customFds option is deprecated. Use options.stdio
instead.
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.
TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu
mber. [E:\PacificCX\testSecond\build\binding.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x
64.targets(146,5): error MSB6006: "CL.exe" exited with code -1073741515. [E:\Pa
cificCX\testSecond\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\kamaldeep.singh\AppData\Roam
ing\npm\node_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kamaldeep.sin
gh\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js" "build"
gyp ERR! cwd E:\PacificCX\testSecond
gyp ERR! node -v v4.2.2
gyp ERR! nw-gyp -v v0.12.4
gyp ERR! not ok
Someone please help me solve this out. Thanks in advance.
Here is the link to my complete sample program. Download Sample
solved this problem by updating Visual Studio 2012.

installing ws with npm causes error with node-gyp

I am working with:
Windows 10 64bit
Node 0.12.7
NPM : 2.11.3
I am going through a MEAN stack tutorial, i am trying to run the following:
npm install --save ws
I get this error message:
C:\Dev\workspace\MeanProject\NodeServer>npm install --save ws
npm WARN package.json socialapp# No description
npm WARN package.json socialapp# No repository field.
npm WARN package.json socialapp# No README data
npm WARN package.json socialapp# No license field.
/
> utf-8-validate#1.2.1 install C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targe
ts(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the regi
stry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versi
on number. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_mo
dules\utf-8-validate\build\validation.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
file specified. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\n
ode_modules\utf-8-validate\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
> bufferutil#1.2.1 install C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild
C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targe
ts(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the regi
stry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versi
on number. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_mo
dules\bufferutil\build\bufferutil.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
file specified. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\n
ode_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
ws#0.8.0 node_modules\ws
I have the 2015 VS.
Any help would be appreciated.
CL.exe is part of C++ dev environment. It is not installed by default. So, creating a new C++ Project in Visual Studio installs all needed components, including cl.exe.
You can find it under "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe" and it's on path when launching "Developer Command Prompt for VS2015."
This is because of running older version of gcc. Install the latest and the issue will be solved. Check this out for more details: https://github.com/assaf/zombie/issues/956