Open simonihmig opened 3 years ago
Ya the types
entry point seems wrong there (I think it should be dist/types/index.d.ts
).
Yes, and the right path exists for its alias typings
. But the bigger problem, leading to the exception, seems to be that the other entry points (main
etc.) don't exist (or rather the files they refer to).
I wanted to import types from
@glimmer/interfaces
(Component manager interfaces) in an Ember addon, however that fails withCan't resolve '@glimmer/interfaces'
:Stack Trace
``` ================================================================================= ENV Summary: TIME: Wed Apr 07 2021 20:24:37 GMT+0200 (Central European Summer Time) TITLE: ember ARGV: - /Users/simonihmig/.volta/tools/image/node/10.22.0/bin/node - /Users/simonihmig/Projects/ember-ecsy-babylon/node_modules/.bin/ember - serve EXEC_PATH: /Users/simonihmig/.volta/tools/image/node/10.22.0/bin/node TMPDIR: /var/folders/q3/yzggf_l965zbzps_bk8xr37c0000gn/T SHELL: /bin/zsh PATH: - /var/folders/q3/yzggf_l965zbzps_bk8xr37c0000gn/T/yarn--1617819854705-0.6245694040083662 - /Users/simonihmig/Projects/ember-ecsy-babylon/node_modules/.bin - /Users/simonihmig/.config/yarn/link/node_modules/.bin - /Users/simonihmig/.volta/tools/image/node/10.22.0/libexec/lib/node_modules/npm/bin/node-gyp-bin - /Users/simonihmig/.volta/tools/image/node/10.22.0/lib/node_modules/npm/bin/node-gyp-bin - /Users/simonihmig/.volta/tools/image/node/10.22.0/bin/node_modules/npm/bin/node-gyp-bin - /Users/simonihmig/.volta/tools/image/npm/6.14.11/bin - /Users/simonihmig/.volta/tools/image/yarn/1.22.4/bin - /Users/simonihmig/.volta/tools/image/node/10.22.0/bin - /Users/simonihmig/.volta/bin - /Users/simonihmig/.yarn/bin - /Users/simonihmig/.cargo/bin - /usr/local/bin - /usr/bin - /bin - /usr/sbin - /sbin - /Library/Apple/usr/bin - /Users/simonihmig/Projects/ember-ecsy-babylon/node_modules/.bin PLATFORM: darwin x64 FREEMEM: 40628224 TOTALMEM: 17179869184 UPTIME: 373736 LOADAVG: 3.63525390625,2.64208984375,2.794921875 CPUS: - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 2600 ENDIANNESS: LE VERSIONS: - ares: 1.15.0 - brotli: 1.0.7 - cldr: 35.1 - http_parser: 2.9.3 - icu: 64.2 - modules: 64 - napi: 6 - nghttp2: 1.41.0 - node: 10.22.0 - openssl: 1.1.1g - tz: 2019c - unicode: 12.1 - uv: 1.34.2 - v8: 6.8.275.32-node.58 - zlib: 1.2.11 ERROR Summary: - broccoliBuilderErrorStack: Error: Can't resolve '@glimmer/interfaces' in '/Users/simonihmig/Projects/ember-ecsy-babylon' at doResolve (/Users/simonihmig/Projects/ember-ecsy-babylon/node_modules/enhanced-resolve/lib/Resolver.js:209:21) at hook.callAsync (/Users/simonihmig/Projects/ember-ecsy-babylon/node_modules/enhanced-resolve/lib/Resolver.js:285:5) at _fn0 (eval at create (/Users/simonihmig/Projects/ember-ecsy-babylon/node_modules/tapable/lib/HookCodeFactory.js:33:10),Turns out that the published package.json contains references (
main
,module
etc.) that actually don't exist. The magic that write-package-json.js applies does not fit for this type-only package. So it seems trying toresolve()
the package location fails asmain
does not point to a valid location.For easier reference see what gets published here: