I have been using assert-ts fine with different environments. However, now when running with Node v16.14.2 in SvelteKit with its Node.Js adapter for Trading Strategy frontend I am getting the following error:
import assert from 'assert-ts';
console.log("Assert is", assert);
assert(input, 'input number missing');
TypeError: assert is not a function
The assert object looks good based on console.log output:
Assert is {
configureAssert: [Getter],
testResetConfiguration: [Getter],
assert: [Getter],
default: [Function: hardAssert] { soft: [Function: softAssert] }
}
This happens only when running SvelteKit application using Node.js production build adapter, not when running it with Vite development server.
Will keep debugging. All tips welcome.
I have been using
assert-tsfine with different environments. However, now when running with Node v16.14.2 in SvelteKit with its Node.Js adapter for Trading Strategy frontend I am getting the following error:The assert object looks good based on
console.logoutput:This happens only when running SvelteKit application using Node.js production build adapter, not when running it with Vite development server.
Will keep debugging. All tips welcome.