adonisjs / web-starter-kit

Starter kit for creating traditional server rendered applications using AdonisJS
18 stars 7 forks source link

The init adonisjs command fails with "failed to download web template" #1

Closed gregmsanderson closed 7 months ago

gregmsanderson commented 8 months ago

Package version

1.2.2-1

Describe the bug

Hello,

I simply copied the command from the Usage section to try out the web starter kit. However it seems to reference a template that does not exist and so fails:

npm init adonisjs -- -K="web"
(node:11091) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

    ___       __            _          _
   /   | ____/ /___  ____  (_)____    (_)____
  / /| |/ __  / __ \/ __ \/ / ___/   / / ___/
 / ___ / /_/ / /_/ / / / / (__  )   / (__  )
/_/  |_\__,_/\____/_/ /_/_/____(_)_/ /____/
                                /___/

❯ Where should we create the project? · ./adonis-web
[ wait ] Failed to download template ...
[ error ] Failed to download template from registry: Failed to download web template info from https://raw.githubusercontent.com/unjs/giget/main/templates/web.json: 404 Not Found

Interestingly passing a name and not using the flag (have to pick web manually) works:

npm init adonisjs delete-this-app
(node:11656) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

    ___       __            _          _
   /   | ____/ /___  ____  (_)____    (_)____
  / /| |/ __  / __ \/ __ \/ / ___/   / / ___/
 / ___ / /_/ / /_/ / / / / (__  )   / (__  )
/_/  |_\__,_/\____/_/ /_/_/____(_)_/ /____/
                                /___/

❯ Select the template you want to use · Web Starter Kit
[ wait ] Template downloaded successfully ...
❯ Do you want to install dependencies? (Y/n) · false
❯ Do you want to initialize a git repository? (Y/n) · false
...

Reproduction repo

No response

gregmsanderson commented 8 months ago

Ah, I wouldn't have thought of that. Yep, using that github reference fixes it:

npm init adonisjs -- -K="github:adonisjs/web-starter-kit"

On Sat, 30 Dec 2023 at 06:20, Angga Saputra @.***> wrote:

try using it npm init adonisjs -- -K="github:adonisjs/web-starter-kit"

Julien-R44 commented 7 months ago

Yup, should be used with github reference

I updated the readme. thanks !