Netlify CLI does not work well with monorepos
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 474
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 53
Description
Describe the bug
Hi,
I have trouble when I'm working with Netlify CLI on monorepos. It's a bit weird cuz I've tried many configurations, and sometimes it works, but I also have issues with import_map. Nevertheless, always monorpo was problematic.
Best,
Steps to reproduce
- git clone https://github.com/zdunecki/example-edge-netlify-issue
- cd example-edge-netlify-issue
- pnpm i
- cd packages/package-a/examples/example-a/
- pnpm run netlify:dev
This should serve hello function, but does not work. I've tried without a monorepo, and it was working fine.
There's also a problem with import_map - I'm not quite sure, but cuz I've tried multiple configurations and previously monorpo was working, but import_map was not.
But as far as I debug that, problems always happen on my monorepo setu,p like monorepo + pnpm workspaces.
Configuration
No response
Environment
1. git clone https://github.com/zdunecki/example-edge-netlify-issue
2. cd example-edge-netlify-issue
3. pnpm i
4. cd packages/package-a/examples/example-a/
5. pnpm run netlify:dev
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Clone zdunecki/example-edge-netlify-issue, install with pnpm, then run pnpm run netlify:dev from packages/package-a/examples/example-a/. Compare the monorepo and pnpm workspace behavior with the reported non-monorepo case, including the import_map concern; done means the hello function is served successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100