Closed gossi closed 1 year ago
Module '@ember/test-helpers' resolves to an untyped module at '/Users/thomas/code/gossi/ember-truth-helpers/node_modules/@ember/test-helpers/index.js', which cannot be augmented.
The TS error there is telling you what's wrong—the package has @ember/test-helpers
installed but no types available. You either need to add @types/ember__test-helpers
or upgrade to a more recent release of @ember/test-helpers
that ships its own types.
That's the thing: It is using the latest version of @ember/test-helpers
which has the types, but glint is not able to find them.
The lockfile shows you have multiple copies floating around: https://github.com/gossi/ember-truth-helpers/blob/194ff53b1e4e3936a65790af93a9ee43389949a1/yarn.lock#L1506-L1530
In my attempt to add glint support for ember-truth-helpers, see https://github.com/jmurphyau/ember-truth-helpers/pull/176 I tried to run type-checks for the glint types in a test-app next to the addon itself, by running
glint
.Then glint complains about:
I also had to comment out environment type imports in
types/global.d.ts
in order to start the ember server (it was failing for the same reason):Repro:
yarn
cd packages/modern-test-app
yarn _lint:types
For the other errors I created #580