I receive this stack trace when trying to invoke createPublicClient in nodejs environment:
TypeError: (0 , S.default) is not a function
at G (/Users/petrpotapov/Projects/lottery-smart-func/smart-func/node_modules/@fotonjs/api/dist/index.cjs:1:2864)
at $ (/Users/petrpotapov/Projects/lottery-smart-func/smart-func/node_modules/@fotonjs/core/dist/index.cjs:1:1207)
at Object.<anonymous> (/Users/petrpotapov/Projects/lottery-smart-func/smart-func/scripts/getLotteryResults.ts:16:47)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module.m._compile (/Users/petrpotapov/Projects/lottery-smart-func/smart-func/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Object.require.extensions.<computed> [as .ts] (/Users/petrpotapov/Projects/lottery-smart-func/smart-func/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Function.Module._load (node:internal/modules/cjs/loader:1022:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
Environment:
"@fotonjs/core": "^0.0.7",
"@ton/core": "^0.56.3",
TS config (tested in different environments, didn't help):
{
"compilerOptions": {
"target": "ES2020",
"outDir": "dist",
"module": "commonjs",
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
My current ideation process is that this library is designed to be used in browser environment with nodejs polyfills and isn't designed to be used on the backend. Is that correct assumption?
I receive this stack trace when trying to invoke createPublicClient in nodejs environment:
Environment:
"@fotonjs/core": "^0.0.7",
"@ton/core": "^0.56.3",
TS config (tested in different environments, didn't help):
{
"compilerOptions": {
"target": "ES2020",
"outDir": "dist",
"module": "commonjs",
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
My current ideation process is that this library is designed to be used in browser environment with nodejs polyfills and isn't designed to be used on the backend. Is that correct assumption?