(i assume the answer is yes) does your pnpm-workspace.yaml have both packages added?
Yes
is the app (and/or addon) using gjs/gts components or “regular” loose mode glimmer components?
Regular, it’s just a learning setup right now, so I didn’t wan’t to add even more complexity till it does anything.
If “regular” components, and the addon is v1, do you have a re-export in /app
for the component?
Yes
Anyway to answer your actual questions…
Ignore the following, continue with the next comment in this thread.
I was more looking for some general pointers on how to work once I have a repo with an addon and an app (I’m mostly doing backend stuff in a huge Java/Kotlin monorepo, so a JS monorepo is as new to me as it gets). What my understanding is:
- After addon and app have been created, remove their
node_modules
- From the repo root
pnpm install
Then what? What’s the development workflow?
pnpm -F <addon-name> build
? That crashes with ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL
- Or is it
pnpm -F <addon-name> start
? That doesn’t throw an error, but does it work?
- Then start the app with
pnpm -F <app-name> start
? While that somehow works, it gives me a strange deprecation warning of:
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: test-app -> test-addon -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: test-app -> test-addon -> ember-cli-htmlbars-inline-precompile -> ember-cli-babel
WARNING: [DEPRECATION] [DEPRECATION] Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.
That doesn’t make any sense, app and addon are both generated with the latest ember-cli
, so there shouldn’t be anything outdated. The addon contains only a single component with a static template, the app is just what you get when you setup a new app, but with the addon’s component added to the application template.
I’m obviously doing something very wrong, but I have no clue what that is.
Sorry if that sounds wild, but I’m totally lost here. My JS/Ember knowledge ends at “Repo with a single ember app in it” and googling mostly returns +10 years old SO questions about Ember 1.0.