@hubspot/api-client v8.0.0 typescript compile errors
See original GitHub issueI’m trying to bump our @hubspot/api-client dependency to v8.0.0 from v7.1.2 and our webpack build fails with the updated dependency giving hundreds of errors like the following:
ERROR in ./node_modules/@hubspot/api-client/lib/src/discovery/webhooks/WebhooksDiscovery.d.ts
Module build failed (from ./node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for /home/rich/source/meetingplan/packages/server/node_modules/@hubspot/api-client/lib/src/discovery/webhooks/WebhooksDiscovery.d.ts. By default, ts-loader will not compile .ts files in node_modules.
You should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option.
See: https://github.com/Microsoft/TypeScript/issues/12358
at makeSourceMapAndFinish (/home/rich/source/meetingplan/packages/server/node_modules/ts-loader/dist/index.js:52:18)
at successLoader (/home/rich/source/meetingplan/packages/server/node_modules/ts-loader/dist/index.js:39:5)
at Object.loader (/home/rich/source/meetingplan/packages/server/node_modules/ts-loader/dist/index.js:22:5)
@ ./node_modules/@hubspot/api-client/lib/src/discovery/ sync ^\.\/.*$ ./webhooks/WebhooksDiscovery.d.ts ./webhooks/WebhooksDiscovery.d
@ ./node_modules/@hubspot/api-client/lib/src/services/initObject.js 5:26-57
@ ./node_modules/@hubspot/api-client/lib/src/client.js 15:21-53
@ ./node_modules/@hubspot/api-client/lib/index.js 4:15-38
Each error is for a different ./node_modules/@hubspot/api-client/lib/src/**/*.d.ts
file.
On top of this, and possibly related, I’m seeing some APIs like client.crm.deals.searchApi.doSearch
which used to return CollectionResponseWithTotalSimplePublicObjectForwardPaging
, or client.crm.companies.batchApi.read
which used to return BatchResponseSimplePublicObjectWithErrors
are now returning any
flagging new type errors in existing code.
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:11
Top Results From Across the Web
HubSpot Library in Typescript and esModuleInterop
The solution to esModuleInterop errors reported by tsc for the HubSpot API library files is to add "esModuleInterop": true to tsconfig.json under the...
Read more >Consider adding @types/request to dependencies #82 - GitHub
When I use @hubspot/api-client from TypeScript, I get compilation errors from tsc which complains that it doesn't understand what request is ...
Read more >@hubspot/api-client - npm
Start using @hubspot/api-client in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >Notice Report - Product documentation - NetApp
@typescript-eslint/eslint-plug in 1.7.1-alpha.31 ... apollo-client 2.6.10-test.0. MIT License ... blakeembrey/pluralize v8.0.0 MIT License.
Read more >PickBazar - React Ecommerce Template with ... - ThemeForest
Buy PickBazar - React Ecommerce Template with React Hooks, Next JS, GraphQL & REST API by redqteam on ThemeForest. Our super-fast E-commerce ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ksvirkou-hubspot FWIW, the work from #252 could be done in a (near-)type-safe, anyless way by using
import type
(which disappears at TypeScript compile time), e.g.and then typing the field as
and making
initObject
generic (with an unfortunate pinky-swearas
for the type):and finally
(the latter may need a local for TS’s inference to work.)
Hi, I am also seeing lots of typescript errors when trying to update. It appears a lot of the types are missing, or at least have been replaced by
any
. The client.d.ts file in my node_modules directory looks like this with 7.1.2:but with 8.0.0 it looks like this:
And this is leading to issues wherever we iterate on a collection, eslint is complaining that it doesn’t have enough type information, for example
TS7006: Parameter 'hsOwner' implicitly has an 'any' type.