You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I receive the below error after instantiating DataContext with my Infusionsoft token.
const infusionsoft = new api.DataContext(${infusionAccessToken});
This works correctly when I use the no longer maintained infusionsoft-api library. I'm importing the library rather than using require because it is not defined in my ES module scope (this may not have any bearing on the issue).
Do you have any ideas? It's really odd as I'm not doing anything out of the norm and it works with the older library. The older library is returning an error when returning a promise, but you can access the API.
TypeError: require(...).class is not a function
at Object. (C:\Users\steve\projects\mos\node_modules\infusionsoft-javascript-api\lib\Queryable.js:10:7)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\steve\projects\mos\node_modules\infusionsoft-javascript-api\lib\DataContext.js:1:17)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
The text was updated successfully, but these errors were encountered:
Hello,
I receive the below error after instantiating DataContext with my Infusionsoft token.
const infusionsoft = new api.DataContext(
${infusionAccessToken}
);This works correctly when I use the no longer maintained infusionsoft-api library. I'm importing the library rather than using require because it is not defined in my ES module scope (this may not have any bearing on the issue).
Do you have any ideas? It's really odd as I'm not doing anything out of the norm and it works with the older library. The older library is returning an error when returning a promise, but you can access the API.
Console error:
\node_modules\infusionsoft-javascript-api\lib\Queryable.js:10
.class('Queryable') .define({
^
TypeError: require(...).class is not a function
at Object. (C:\Users\steve\projects\mos\node_modules\infusionsoft-javascript-api\lib\Queryable.js:10:7)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\steve\projects\mos\node_modules\infusionsoft-javascript-api\lib\DataContext.js:1:17)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
The text was updated successfully, but these errors were encountered: