AFJ Test Agents not starting: error with node-fetch
swcurran opened this issue · 1 comments
swcurran commented
Here is the error:
Starting AFJ agent ...
�[2K�[1G�[1myarn run v1.22.19�[22m
�[2K�[1G�[2m$ /src/node_modules/.bin/ts-node src/index.ts -p 9020 -i false�[22m
/src/node_modules/ts-node/src/index.ts:744
return new TSError(diagnosticText, diagnosticCodes);
^
TSError: ⨯ Unable to compile TypeScript:
�[96msrc/utils/httpUtils.ts�[0m:�[93m1�[0m:�[93m36�[0m - �[91merror�[0m�[90m TS7016: �[0mCould not find a declaration file for module 'node-fetch'. '/src/node_modules/node-fetch/lib/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`
�[7m1�[0m import fetch, { RequestInit } from 'node-fetch'
�[7m �[0m �[91m ~~~~~~~~~~~~�[0m
at createTSError �[90m(/src/�[39mnode_modules/�[4mts-node�[24m/src/index.ts:744:12�[90m)�[39m
at reportTSError �[90m(/src/�[39mnode_modules/�[4mts-node�[24m/src/index.ts:748:19�[90m)�[39m
at getOutput �[90m(/src/�[39mnode_modules/�[4mts-node�[24m/src/index.ts:935:36�[90m)�[39m
at Object.compile �[90m(/src/�[39mnode_modules/�[4mts-node�[24m/src/index.ts:1237:30�[90m)�[39m
at Module.m._compile �[90m(/src/�[39mnode_modules/�[4mts-node�[24m/src/index.ts:1364:30�[90m)�[39m
�[90m at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)�[39m
at Object.require.extensions.<computed> [as .ts] �[90m(/src/�[39mnode_modules/�[4mts-node�[24m/src/index.ts:1368:12�[90m)�[39m
�[90m at Module.load (node:internal/modules/cjs/loader:1117:32)�[39m
�[90m at Function.Module._load (node:internal/modules/cjs/loader:958:12)�[39m
�[90m at Module.require (node:internal/modules/cjs/loader:1141:19)�[39m {
diagnosticText: �[32m"\x1B[96msrc/utils/httpUtils.ts\x1B[0m:\x1B[93m1\x1B[0m:\x1B[93m36\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS7016: \x1B[0mCould not find a declaration file for module 'node-fetch'. '/src/node_modules/node-fetch/lib/index.js' implicitly has an 'any' type.\n"�[39m +
�[32m" Try `npm i --save-dev @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`\n"�[39m +
�[32m'\n'�[39m +
�[32m"\x1B[7m1\x1B[0m import fetch, { RequestInit } from 'node-fetch'\n"�[39m +
�[32m'\x1B[7m \x1B[0m \x1B[91m ~~~~~~~~~~~~\x1B[0m\n'�[39m,
diagnosticCodes: [ �[33m7016�[39m ]
}
�[2K�[1G�[31merror�[39m Command failed with exit code 1.
�[2K�[1G�[34minfo�[39m Visit �[1mhttps://yarnpkg.com/en/docs/cli/run�[22m for documentation about this command.
swcurran commented
Thanks!