jsapi-resources icon indicating copy to clipboard operation
jsapi-resources copied to clipboard

Cannot find namespace '__esri'

Open sasteigerwald opened this issue 6 years ago • 3 comments

I am reporting an issue with

  • [x] TypeScript definitions
  • [ ] another resource in this repository

We've moved our app into Nx and now always receive the tslint error "Cannot find namespace '__esri'". We've tried adding the arcgis-js-api to the types in many of the tsconfig files, all to no avail. The app still runs fine, so this is more of an annoyance than anything, but we try to keep the app lint error free.

sasteigerwald avatar May 13 '19 18:05 sasteigerwald

One thing we found on that when a component's inputs or output parameters have an esri type hint set, this causes the error above. When we remove those hints, we are able to use type hints on both components and unit test files without issues.

devilsgeographer avatar Sep 24 '19 16:09 devilsgeographer

+1 I've experienced the same problem.

rustygreen avatar Jun 06 '22 19:06 rustygreen

@rustygreen if you or others on this thread are able to provide a simple github repo that reproduces the issue we'll take a look. There are quite a few reasons why this message could appear.

andygup avatar Jun 07 '22 19:06 andygup