-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNPM support (not hardcoding location of node_modules on disk) #1313
Open
thescientist13 opened this issue
Nov 13, 2024
· 0 comments
· Fixed by #1314 or #1326 · May be fixed by #1341
Open
PNPM support (not hardcoding location of node_modules on disk) #1313
thescientist13 opened this issue
Nov 13, 2024
· 0 comments
· Fixed by #1314 or #1326 · May be fixed by #1341
Labels
Milestone
Comments
This was referenced Nov 19, 2024
Closed
thescientist13
added
enhancement
Improve something existing (e.g. no docs, new APIs, etc)
and removed
feature
New feature or request
labels
Nov 23, 2024
thescientist13
changed the title
PNPM support
PNPM support (not hardcoding location of node modules)
Nov 23, 2024
thescientist13
changed the title
PNPM support (not hardcoding location of node modules)
PNPM support (not hardcoding location of _node_modules_ on disk)
Nov 23, 2024
thescientist13
changed the title
PNPM support (not hardcoding location of _node_modules_ on disk)
PNPM support (not hardcoding location of node_modules on disk)
Nov 23, 2024
6 tasks
8 tasks
8 tasks
github-project-automation
bot
moved this from 🏗 In progress
to ✅ Done
in [Greenwood] Phase 10 - Ecosystem Compat
Dec 2, 2024
thescientist13
moved this from ✅ Done
to 🏗 In progress
in [Greenwood] Phase 10 - Ecosystem Compat
Dec 2, 2024
11 tasks
thescientist13
moved this from 🏗 In progress
to 👀 In review
in [Greenwood] Phase 10 - Ecosystem Compat
Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type of Change
Feature
Summary
Although pnpm will work with Greenwood, there are a couple issues that have been observed that make the experience a little challenging out of the gate, mostly all related to how pnpm handles installing and managing node_modules (it is very strict!)
This causes a couple related issues:
Transtive Dependencies
There are cases where we showcase using transitive dependencies in our code samples which will fail since pnpm will not install them in the current directory, requiring the use of
shamefully-hoist: true
Examples:
Import Maps
Another critical issue that comes out of the above behavior is that import map walking will thus fail to resolve any
dependencies
since it assumes all dependencies are installed into the current directoryhttps://github.com/ProjectEvergreen/greenwood/blob/v0.30.1/packages/cli/src/lib/walker-package-ranger.js#L118
Details
I think one thing that would essentially unlock help here is working on #684, or otherwise any other places in the CLI where it assumes a specific location for node_modules.
Additionally, we'll need to figure out how to handle how to handle the code samples that reference transitive dependencies that may have to be installed first party, which is a bummer since its nice to be able to rely on the dependency graph of Greenwood specific packages.
The current workaround is to manually set
shamefully-hoist=true
in .npmrc, which we now call out in the Setup docshttps://greenwoodjs.dev/docs/introduction/setup/#install
The text was updated successfully, but these errors were encountered: