Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESOCKETTIMEDOUT during npx create-toolpad-app dog-app #2869

Closed
2 tasks done
GalenMurdock opened this issue Nov 4, 2023 · 2 comments
Closed
2 tasks done

ESOCKETTIMEDOUT during npx create-toolpad-app dog-app #2869

GalenMurdock opened this issue Nov 4, 2023 · 2 comments
Labels
scope: toolpad-studio Abbreviated to "studio" support: question Community support but can be turned into an improvement

Comments

@GalenMurdock
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Steps:

Follow instructions on https://mui.com/toolpad/getting-started/first-app/

  1. Fresh install of node.js and dependencies (per link). NOTE: i hadn't installed yarn yet on this box, so i got a 'yarn' not recognized error at first. I uninstalled node and reinstalled node, same result. After I installed yarn (npm install --global yarn) i got past that.

  2. Create a new application, such as:
    npx create-toolpad-app dog-app
    npx create-toolpad-app test123

Current behavior 😯

The script stalls on 749/750 as follows:

C:\Users\galen\Dev\MuiToolpad>npx create-toolpad-app test123
npx: installed 106 in 17.457s

info - Creating Toolpad project in C:\Users\galen\Dev\MuiToolpad\test123

info - Initializing package.json file
info - Initializing .gitignore file
info - Installing dependencies

yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning @mui/toolpad > json-to-ts > es7-shim > [email protected]: The original `String.prototype.at` proposal has been replaced by a new one; please use v1 or later of `string.prototype.at` instead
warning @mui/toolpad > react-dev-utils > fork-ts-checker-webpack-plugin > [email protected]: this will be v4
[2/4] Fetching packages...
[##################################################################################################################################################################################################################################] 749/750

then after several retries (maybe 3-4 minutes' worth), times out with the error:

C:\Users\galen\Dev\MuiToolpad>npx create-toolpad-app test123
npx: installed 106 in 17.457s

info - Creating Toolpad project in C:\Users\galen\Dev\MuiToolpad\test123

info - Initializing package.json file
info - Initializing .gitignore file
info - Installing dependencies

yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning @mui/toolpad > json-to-ts > es7-shim > [email protected]: The original `String.prototype.at` proposal has been replaced by a new one; please use v1 or later of `string.prototype.at` instead
warning @mui/toolpad > react-dev-utils > fork-ts-checker-webpack-plugin > [email protected]: this will be v4
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.14.16.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\galen\\Dev\\MuiToolpad\\test123\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Command failed with exit code 1: yarn add @mui/toolpad

C:\Users\galen\Dev\MuiToolpad>

Funny thing is, the link https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.14.16.tgz resolves just fine and immediately downloads in Chrome.

Here's the yarn-error.log:

Arguments: 
  C:\Program Files\nodejs\node.exe C:\Users\galen\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js add @mui/toolpad

PATH: 
  C:\Users\galen\AppData\Roaming\npm-cache\_npx\16184;C:\Python312\Scripts\;C:\Python312\;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\PowerShell\7\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Users\galen\AppData\Local\Microsoft\WindowsApps;C:\Users\galen\.dotnet\tools;C:\Users\galen\AppData\Local\GitHubDesktop\bin;C:\Users\galen\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\galen\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\galen\AppData\Roaming\npm

Yarn version: 
  1.22.19

Node version: 
  20.9.0

Platform: 
  win32 x64

Trace: 
  Error: https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.14.16.tgz: ESOCKETTIMEDOUT
      at ClientRequest.<anonymous> (C:\Users\galen\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141517:19)
      at Object.onceWrapper (node:events:628:28)
      at ClientRequest.emit (node:events:514:28)
      at TLSSocket.emitRequestTimeout (node:_http_client:840:9)
      at Object.onceWrapper (node:events:628:28)
      at TLSSocket.emit (node:events:526:35)
      at Socket._onTimeout (node:net:589:8)
      at listOnTimeout (node:internal/timers:573:17)
      at process.processTimers (node:internal/timers:514:7)

npm manifest: 
  {
    "name": "test123",
    "version": "0.1.0",
    "private": true,
    "scripts": {
      "dev": "toolpad dev",
      "build": "toolpad build",
      "start": "toolpad start"
    },
    "dependencies": {
      "@mui/toolpad": "latest"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Expected behavior 🤔

That the script would work without errors. :)

Context 🔦

Trying to test out Toolpad for the first time by following the instructions on https://mui.com/toolpad/getting-started/first-app/

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
C:\Users\galen\Dev\MuiToolpad>npx @mui/envinfo
npx: installed 2 in 3.616s

  System:
    OS: Windows 11 10.0.22621
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (119.0.2151.44)


C:\Users\galen\Dev\MuiToolpad>
@GalenMurdock GalenMurdock added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 4, 2023
@GalenMurdock
Copy link
Author

GalenMurdock commented Nov 4, 2023

I repeated the steps on another machine, and I think I mistakenly stopped the node.js chocolatey script too soon on my first machine (i thought a warning/error was the end of the PowerShell script). This time on the second machine I just let it sit there for 5+ min and the PowerShell script eventually succeeded.

Then, the first time I ran npx creat-toolpad-app dog-app i got a notice recommending i upgrade from npm 10.1.0 -> 10.2.3, then it errored out saying 'no such file or directory, lstat 'c:\Users\galen\AppData\Roaming\npm'. I then upgraded npm and everything worked fine.

Now going to my original machine, uninstalling node (and chocolately) so I can try this again.

@GalenMurdock
Copy link
Author

Yeah, my bad. I shoulda been more patient. Waiting (5+ min) at a time when the install seemed to be hung was the trick. Thanks!

@oliviertassinari oliviertassinari added support: question Community support but can be turned into an improvement and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 25, 2023
@oliviertassinari oliviertassinari added the scope: toolpad-studio Abbreviated to "studio" label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: toolpad-studio Abbreviated to "studio" support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants