forcedotcom / lwc-dev-server-feedback

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

Error while installing " sfdx plugins:install @salesforce/lwc-dev-server" #3

Open sfdcdevops opened 4 years ago

sfdcdevops commented 4 years ago

Describe the bug error An unexpected error occurred: "https://registry.yarnpkg.com/@salesforce/lwc-dev-server-dependencies/-/lwc-dev-server-dependencies-1.0.47.tgz: ESOCKETTIMEDOUT".

To Reproduce Steps to reproduce the behavior:

Go to SFDX project in terminal

Make sure you are not logged into any scratch org

run the following command : 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 > @lwc/style-compiler > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. warning @salesforce/lwc-dev-server > @lwc/style-compiler > cssnano > postcss-merge-rules > postcss-selector-parser > flatten@1.0.2: I wrote this module a very long time ago; you should use something else. warning @salesforce/lwc-dev-server > @salesforce/command > @oclif/test > fancy-test > @types/nock@11.1.0: This is a stub types definition. nock provides its own type definitions, so you do not need this installed. warning @salesforce/lwc-dev-server > @salesforce/core > @salesforce/ts-sinon > sinon > @sinonjs/formatio > samsam@1.3.0: This package has been deprecated in favour of @sinonjs/samsam error An unexpected error occurred: "https://registry.yarnpkg.com/@salesforce/lwc-dev-server-dependencies/-/lwc-dev-server-dependencies-1.0.47.tgz: ESOCKETTIMEDOUT". Installing plugin @salesforce/lwc-dev-server... !

Desktop (please complete the following information): Windows 10

Note : Tried 4-5 times, and installation get stuck with this error.

KrisGraySFDC commented 4 years ago

If you navigate directly to the url: https://registry.yarnpkg.com/@salesforce/lwc-dev-server-dependencies/ does it show anything for you?

sfdcdevops commented 4 years ago

it redirects to "https://yarnpkg.com/en/docs/cli/add" page

AllanOricil commented 4 years ago

I had some problems installing it too. Just uninstall the sfdx you currently have and install it again. Then run sfdx update. After that, run the command to install the plugin again. It worked for me.

BobSeu commented 4 years ago

Are you behind a proxy? Whenever I've seen that error in relation to sfdx, it's because I hadn't set my HTTP_PROXY and HTTPS_PROXY environment variables.

roqueian84 commented 4 years ago

What is the fix for this?

stale[bot] commented 4 years ago

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

willianmatheus98 commented 4 years ago

same here

stale[bot] commented 4 years ago

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

MuriloKakazu commented 4 years ago

Not sure if it helps you guys, since the error I had was different, but I reinstalled sfdx and npm, and it worked:

https://github.com/forcedotcom/lwc-dev-server-feedback/issues/64

stale[bot] commented 4 years ago

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

git2gus[bot] commented 4 years ago

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

vijayygr commented 3 years ago

I am trying to install LWC dev server on my windows 10 laptop. Getting the following error. It would be appreciable if someone can through how to fix this issue. image

vijayygr commented 3 years ago

I got it resolved this issue. Here is what it worked for me:

  1. Installation of Nodejs software and disconnect from office network VPN (if connected). 2. >Install node gyp by running        npm install -g node-gyp
  2. And then after that, you can run       npm install --global --production windows-build-tools
  3. And finally tried the below command it worked after 2 3 times..      sfdx plugins:install @salesforce/lwc-dev-server
stale[bot] commented 3 years ago

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

prolayc commented 3 years ago

I am facing the same issue. I tried the following. I updated the CLI by issuing the command sfdx update. Then I ran the command sfdx plugins:install @salesforce/lwc-dev-server. Unfortunately, it failed. Please see the below screenshot.

image

AllanOricil commented 3 years ago

I am facing the same issue. I tried the following. I updated the CLI by issuing the command sfdx update. Then I ran the command sfdx plugins:install @salesforce/lwc-dev-server. Unfortunately, it failed. Please see the below screenshot.

image

@prolayc try unistalling everything

DeveloperSudipto commented 3 years ago

Hi All , I am getting below error message. gyp ERR! configure error gyp ERR! stack Error: ENOENT: no such file or directory, open 'C:\path\to\DigiCertHighAssuranceEVRootCA.crt' gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command "C:\Users\USER\AppData\Local\sfdx\client\7.108.0-d2f9bbd\bin\node.exe" "C:\Users\USER\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" gyp ERR! cwd C:\Users\USER\AppData\Local\sfdx\node_modules\fibers gyp ERR! node -v v14.17.1 gyp ERR! node-gyp -v v8.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. Installing plugin @salesforce/lwc-dev-server... failed Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:C:\Users\USER\AppData\Local\sfdx\yarn.lock --preferred-cache-folder=C:\Users\USER\AppData\Local\sfdx\yarn --check-files exited with code 1

Tried the below comands as suggested but still did not work. Installation of Nodejs software and disconnect from office network VPN (if connected).

  1. Install node gyp by running npm install -g node-gyp
  2. And then after that, you can run npm install --global --production windows-build-tools
stale[bot] commented 3 years ago

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

prolayc commented 3 years ago

I am sorry to see that the bug type has automatically changed to type 3. Where this must be considered as a show-stopper. Because I cannot move beyond to install the lwc-dev-server.

AllanOricil commented 3 years ago

@prolayc are you sure you removed sfdx completely before reinstalint it again and then, finally, install the plugin?

prolayc commented 3 years ago

@AllanOricil, Thank you for your response. Yes, I did and getting the same error. Please find the screenshot below

image

AllanOricil commented 3 years ago

@prolayc could you run node -v and post a screen shot here of the output.

If you see a negative message go through this tutorial
[https://www.google.com/amp/s/www.geeksforgeeks.org/how-to-resolve-node-is-not-recognized-as-an-internal-or-external-command-error-after-installing-node-js/amp/ ] to install node. You must install the LTS version of node as per salesforce documentation.

Then after solving a possible bad node version instalation, remove every sfdx package, clear yarn and npm caches, and finally install sfdx from scratch, followed by the dev server plugin.

If you keep seeing the same message as before, run yarn add node-gpy -g. Then try to install de plugin again.

If you still see the same error message then it is better if you open a Case for Salesforce showing in details all the steps you attempted. This will help them to understand what is going wrong and, perhaps, lead to an update on the documentation.

If even they can't figure out the problem, switch to Linux or Macos and your life will change forever, as most of this errors only happen on windows.

prolayc commented 3 years ago

Thank you, @AllanOricil for your reply. I am using the node Windows version. I downloaded it from Node.JS Official Website Please find the screenshot of my Node, NPM, and npx versions. image

I will totally uninstall Node and SFDX. Then I will find the empty directories in windows by using the commandC:\>dir *node* /s. I will do the same for the SFDX also. And then I will delete all the existing folders. I am not going to touch the Windows registry because it is going to be extremely harmful if I delete keys from the Windows registry

Then I will post it here.

Unfortunately, I have a Windows machine. I can install Linux on my VMWARE. But from the sfdx plugin perspective, I would say it should be working in all the operating systems.

prolayc commented 3 years ago

I did everything but it still failed. image

stale[bot] commented 2 years ago

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

forcetrekker commented 2 years ago

@prolayc @DeveloperSudipto I see you have similar-ish issue that I had, please refer to this comment in issue #118

stale[bot] commented 2 years ago

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

canjoku commented 2 years ago

Completely uninstall sfdx for your operating system system. A google search will show you how. Reinstall same, update plugins and then install the lwc server. This should resolve the issue. Hope this helps.

stale[bot] commented 2 years ago

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

tanveer263 commented 2 years ago

I got it resolved this issue. Here is what it worked for me:

  1. Installation of Nodejs software and disconnect from office network VPN (if connected).
    1. Install node gyp by running npm install -g node-gyp

  2. And then after that, you can run npm install --global --production windows-build-tools
  3. And finally tried the below command it worked after 2 3 times.. sfdx plugins:install @salesforce/lwc-dev-server\
error
Ybounaas commented 2 years ago

thank you @tanveer263, that worked for me, but I had to install it on ubuntu with sudo apt-get install -y node-gyp then sfdx plugins:install @salesforce/lwc-dev-server

muthuchinnachamy commented 2 years ago
  1. I installed latest NPM package. Then I got an error like; [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-]

  2. So I used this command in my MacOs. sudo npm install -g --unsafe-perm node-gyp

  3. Then I installed the Local development sever sfdx plugins:install @salesforce/lwc-dev-server

stale[bot] commented 2 years ago

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

Sush9893 commented 2 years ago

I faced the same issue. The following simple steps worked out for me:

  1. Open 'Control Panel'
  2. Type 'Environment Variables'
  3. Go to: User Variables section
  4. Add this path : C:\Program Files\nodejs\ Hope it helps someone. Happy Coding. Cheers!!!
stale[bot] commented 1 year ago

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

mkzyk commented 1 year ago

for my Mac, I just did npm install -g node-gyp and was able to install it sucessfully.

stale[bot] commented 1 year ago

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

dinakarkuntalaSFDC commented 1 year ago

I got it resolved this issue. Here is what it worked for me:

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

is this issue resolved?

dinakarkuntalaSFDC commented 1 year ago

Is this issue resolved yet? I am facing the same issue

dinakarkuntalaSFDC commented 1 year ago

I did everything but it still failed. image

Were you able to solve this?

hrcosko commented 1 year ago

for my Mac, I just did npm install -g node-gyp and was able to install it sucessfully.

Worked for me. Thank you.

stale[bot] commented 1 year ago

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