web-infra-dev / modern.js

Modern.js is a web engineering system, including a web framework and a npm package solution.
https://modernjs.dev/en/
MIT License
4.4k stars 367 forks source link

[Bug]: Unable to create monorepo with @modern-js/create #5823

Closed yf-yang closed 3 months ago

yf-yang commented 3 months ago

Version

System:
    OS: macOS 13.2.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 1.64 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
Browsers:
    Chrome: 125.0.6422.144
    Safari: 16.3

@modern-js/create v2.53.0

Details

When using {"solution": "monorepo"} option doc

[ERROR] solution is not valid 
🚶  Load Generator...[WARN] load sub generator failed

I guess the cli has not yet supported it. Is there any workaround to directly use the monorepo-generator?

Reproduce link

Nope

Reproduce Steps

pnpm create @modern-js -c '{"solution": "monorepo"}' modern
yf-yang commented 3 months ago

Hmmm seems the feature is recently removed https://github.com/web-infra-dev/modern.js/pull/5804

@caohuilin Would you please provide a link of the "community solution", thank you!

zllkjc commented 3 months ago

Hey, we no longer support creating Monorepo for Modern.js and recommend using the community's Monorepo tool directly like rush、nx and maybe juest pnpm-workspaces...

yf-yang commented 3 months ago

Sure, do you have any starter example repo?

zllkjc commented 3 months ago

Maybe you can see https://nx.dev/getting-started/intro

yf-yang commented 3 months ago

Sorry, I am not just asking for a monorepo. Is there a modern-js monorepo example with the configuration already set that I can start with?

zllkjc commented 3 months ago

Get, we don't have it now, you can first create an monorepo, and run npx @modern-js/create in a directory of monorepo where you want start your project

yf-yang commented 3 months ago

Fine, I'll try to follow the doc to make one.

yf-yang commented 3 months ago

That would be better if you can offer more examples like module federation does. Not sure if that's aligned with your okr 🤣