> [email protected] start
> node dist/app.js
internal/modules/cjs/loader.js:1149
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/anvial/Projects/tradingbotx/node_modules/@master-chief/alpaca/dist/mjs/index.js
require() of ES modules is not supported.
require() of /Users/anvial/Projects/tradingbotx/node_modules/@master-chief/alpaca/dist/mjs/index.js from /Users/anvial/Projects/tradingbotx/dist/client/AlpacaClient.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/anvial/Projects/tradingbotx/node_modules/@master-chief/alpaca/package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1149:13)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/Users/anvial/Projects/tradingbotx/dist/client/AlpacaClient.js:7:34)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14) {
code: 'ERR_REQUIRE_ESM'
}