marko-js / cli

command-line tools for Marko
MIT License
95 stars 36 forks source link

@marko/create's default starter app template no longer exists #215

Open stephenscaff opened 1 year ago

stephenscaff commented 1 year ago

Environment

create-marko@6.1.1 node v16.17.1 npm 8.18.0


Details

When choosing the "default starter template app" template during @marko/create, I get the error "Example basic does not exist in marko-js/examples."


Actual Behavior

marko/create errors on default starter app template.


Steps to reproduce

1 - run npm init marko

Need to install the following packages:
  create-marko@6.1.1
Ok to proceed? (y) y

2 - Type y to install, then "Type your project name"

3 - Choose Default starter app template

✔ Choose a template · Default starter app

4 - Error:

✖ Example basic does not exist in marko-js/examples.

Error: Example basic does not exist in marko-js/examples.
    at assertExampleExists (.../node_modules/@marko/create/dist/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async create (.../node_modules/@marko/create/dist/index.js:54:5)
    at async run (.../node_modules/@marko/create/dist/cli.js:151:9)


Additional Questions

Thanks!

tigt commented 1 year ago

I tried reproducing your bug, but it looks like it works now for whatever reason:

Last login: Wed Dec  7 12:50:33 on ttys002
~ % cd Desktop 
Desktop % npm init marko
Need to install the following packages:
  create-marko
Ok to proceed? (y) y
✔ Type your project name · test
✔ Choose a template · Default starter app
✔ Project created! To get started, run:

    cd test
    npm run dev

It might have been fixed in the time between you opening this ticket and me finally getting around to it. 😅

Additional answers

Is the marko cli (marko/build, marko/serve) still supported and considered a valid/recommended approach?

That’s what we plan on recommending in general for the foreseeable future, yeah. @rturnq is working on improving marko/serve, even.

However, I have a need for static builds occasionally, and require a bit more control than ssr-to-html (ie: ensuring all routes are generated without needing front-end links to crawl, removing all unused files).

If you’d be so kind as to give us as much detail as possible on these needs for your project, we’ll look into supporting them better!

In the meantime, my personal favorite DIY build tool for Marko apps is @marko/rollup. If it helps, I have a full Rollup config from an old project you can check/steal from if you like.

wwxiaoqi commented 5 months ago

Maybe he still exists.

Node Version:v20.10.0 npm Version:10.2.3 OS Version: Windows 11 23H2(22631.3007)

$npm init marko
√ Type your project name · my-app
√ Choose a template · Default starter app
× Example basic does not exist in marko-js/examples.

Error: Example basic does not exist in marko-js/examples.
    at assertExampleExists (C:\Users\xiaoqi\AppData\Local\npm-cache\_npx\ba91dde5859b4878\node_modules\@marko\create\dist\index.js:99:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async create (C:\Users\xiaoqi\AppData\Local\npm-cache\_npx\ba91dde5859b4878\node_modules\@marko\create\dist\index.js:54:5)
    at async run (C:\Users\xiaoqi\AppData\Local\npm-cache\_npx\ba91dde5859b4878\node_modules\@marko\create\dist\cli.js:151:9)