stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.78k stars 144 forks source link

Error installing Hono from npm #1383

Open radiorambo opened 6 months ago

radiorambo commented 6 months ago

Describe the bug

❯ npm create hono@latest
Need to install the following packages:
create-hono@0.5.0
Ok to proceed? (y) 

create-hono version 0.5.0
✔ Target directory … my-app
? Which template do you want to use? › - Use arrow-keys. Return to submit.
❯   aws-lambda
    bun
? Which template do you want to use? › - Use arrow-keys. Return to submit.
    aws-lambda
❯   bun
? Which template do you want to use? › - Use arrow-keys. Return to submit.
    aws-lambda
    bun
? Which template do you want to use? › - Use arrow-keys. Return to submit.
    aws-lambda
    bun
? Which template do you want to use? › - Use arrow-keys. Return to submit.
    aws-lambda
    bun
? Which template do you want to use? › - Use arrow-keys. Return to submit.
    aws-lambda
    bun
? Which template do you want to use? › - Use arrow-keys. Return to submit.
  ↑ bun
    cloudflare-pages
? Which template do you want to use? › - Use arrow-keys. Return to submit.
  ↑ cloudflare-pages
    cloudflare-workers
? Which template do you want to use? › - Use arrow-keys. Return to submit.
  ↑ cloudflare-pages
    cloudflare-workers
? Which template do you want to use? › - Use arrow-keys. Return to submit.
  ↑ cloudflare-pages
    cloudflare-workers
✔ Which template do you want to use? › nodejs
DegitError: could not find commit hash for main
    at new DegitError (/home/.npm/_npx/6bbb1d6f54609fb5/node_modules/create-hono/bin:18621:9)
    at Degit._cloneWithTar (/home/.npm/_npx/6bbb1d6f54609fb5/node_modules/create-hono/bin:18986:17)
    at async Degit.clone (/home/.npm/_npx/6bbb1d6f54609fb5/node_modules/create-hono/bin:18850:11) {
  code: 'MISSING_REF',
  ref: 'main'
}
npm ERR! code 1
npm ERR! path /home/projects/stackblitz-starters-iyj78a
npm ERR! command failed
npm ERR! command sh -c create-hono

npm ERR! A complete log of this run can be found in: /home/.npm/_logs/2024-03-15T04_52_32_111Z-debug-0.log```

### Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-iyj78a?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome%27s%20V8%20JavaScript%20engine&file=index.js&title=node.new%20Starter

### Steps to reproduce

1. Select nodejs  (blank project) template
2. wait till everything is setup
3. run `npm create hono@latest`

### Expected behavior

Should install the hono from npm and run it

### Parity with Local

- [X] I have [run the project in my local machine](https://github.com/stackblitz/webcontainer-core/blob/main/repro.md#try-locally) and I could not reproduce the issue.

### Screenshots

_No response_

### Platform

Browser name = Chrome Full version = 122.0.0.0 Major version = 122 navigator.appName = Netscape navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 performance.memory = { "totalJSHeapSize": 61928875, "usedJSHeapSize": 56493527, "jsHeapSizeLimit": 4294705152 } Hash = 810981ba



### Additional context

i have also tried pnpm but same error
jrvidal commented 6 months ago

@radiorambo Could you try again? We have recently fixed an issue that prevented create-hono to work.

radiorambo commented 6 months ago

Just tried again now, still same exact error

jrvidal commented 6 months ago

What options do you choose exactly? Also, are there any suspicious errors in the browser devtools console?

radiorambo commented 6 months ago

npm create hono@latest -> ok to proceed - yes -> target directory - my-app -> Which template do you want to use - nodejs -> getting error

npm log cat /home/.npm/_logs/2024-03-19T10_16_29_417Z-debug-0.log 0 verbose cli /usr/local/bin/node /usr/local/bin/npm 1 info using npm@10.2.3 2 info using node@v18.18.0 3 timing npm:load:whichnode Completed in 1ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 3ms 6 timing config:load:builtin Completed in 3ms 7 timing config:load:cli Completed in 3ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/home/projects/stackblitz-starters-mrfty5/.npmrc Completed in 2ms 10 timing config:load:project Completed in 5ms 11 timing config:load:file:/home/.npmrc Completed in 2ms 12 timing config:load:user Completed in 2ms 13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:flatten Completed in 1ms 16 timing config:load:setEnvs Completed in 1ms 17 timing config:load Completed in 19ms 18 timing npm:load:configload Completed in 19ms 19 timing npm:load:mkdirpcache Completed in 0ms 20 timing npm:load:mkdirplogs Completed in 1ms 21 verbose title npm create hono@latest 22 verbose argv "create" "hono@latest" 23 timing npm:load:setTitle Completed in 3ms 24 timing npm:load:display Completed in 0ms 25 verbose logfile logs-max:10 dir:/home/.npm/_logs/2024-03-19T10_16_29_417Z- 26 verbose logfile /home/.npm/_logs/2024-03-19T10_16_29_417Z-debug-0.log 27 timing npm:load:logFile Completed in 8ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 34ms 31 silly logfile done cleaning log files 32 timing arborist:ctor Completed in 1ms 33 http fetch GET 200 https://registry.npmjs.org/create-hono 77ms (cache miss) 34 timing arborist:ctor Completed in 0ms 35 timing arborist:ctor Completed in 0ms 36 timing idealTree:init Completed in 13ms 37 timing idealTree:userRequests Completed in 4ms 38 timing idealTree:preloadMetadata Completed in 18ms 39 silly idealTree buildDeps 40 silly fetch manifest create-hono@0.5.0 41 silly placeDep ROOT create-hono@0.5.0 OK for: want: 0.5.0 42 timing idealTree:#root Completed in 6ms 43 timing idealTree:node_modules/create-hono Completed in 0ms 44 timing idealTree:buildDeps Completed in 7ms 45 timing idealTree:fixDepFlags Completed in 0ms 46 timing idealTree Completed in 46ms 47 timing reify:loadTrees Completed in 47ms 48 timing reify:diffTrees Completed in 1ms 49 silly reify moves {} 50 timing reify:retireShallow Completed in 1ms 51 timing reify:createSparse Completed in 5ms 52 timing reify:loadBundles Completed in 0ms 53 silly audit bulk request { 'create-hono': [ '0.5.0' ] } 54 timing reifyNode:node_modules/create-hono Completed in 4ms 55 timing reify:unpack Completed in 4ms 56 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 498ms 57 timing auditReport:getReport Completed in 500ms 58 silly audit report {} 59 timing auditReport:init Completed in 0ms 60 timing reify:audit Completed in 503ms 61 timing reify:finalize Completed in 1640ms 62 timing reify:unretire Completed in 1ms 63 timing build:queue Completed in 2ms 64 timing build:link:node_modules/create-hono Completed in 11ms 65 timing build:link Completed in 13ms 66 timing build:deps Completed in 17ms 67 timing build Completed in 18ms 68 timing reify:build Completed in 19ms 69 timing reify:trash Completed in 0ms 70 timing reify:save Completed in 10ms 71 timing reify Completed in 1752ms 72 timing command:create Completed in 10814ms 73 verbose stack Error: command failed 73 verbose stack at ChildProcess.eval (/usr/local/lib/node_modules/npm/dist/common.js:251:5001) 73 verbose stack at EventEmitter.emit (node:events:42:9202) 73 verbose stack at maybeClose (node:internal/child_process:206:13328) 73 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:206:3810) 73 verbose stack at (https://stackblitzstartersmrfty5-tgfw.w-credentialless-staticblitz.com/blitz.810981ba.js:352:500583) 73 verbose stack at _0x398360 (https://stackblitzstartersmrfty5-tgfw.w-credentialless-staticblitz.com/blitz.810981ba.js:352:154306) 73 verbose stack at (https://stackblitzstartersmrfty5-tgfw.w-credentialless-staticblitz.com/blitz.810981ba.js:352:154055) 74 verbose cwd /home/projects/stackblitz-starters-mrfty5 75 verbose Linux 5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 76 verbose node v18.18.0 77 verbose npm v10.2.3 78 error code 1 79 error path /home/projects/stackblitz-starters-mrfty5 80 error command failed 81 error command sh -c create-hono 82 verbose exit 1 83 timing npm Completed in 10933ms 84 verbose code 1 85 error A complete log of this run can be found in: /home/.npm/_logs/2024-03-19T10_16_29_417Z-debug-0.log

console log Screenshot from 2024-03-19 15-48-53