Could not find a declaration file for module '@cetusprotocol/cetus-sui-clmm-sdk'. '/home/ubuntu/repo/sui_practice/src/node/cetis/node_modules/@cetusprotocol/cetus-sui-clmm-sdk/dist/index.js' implicitly has an 'any' type.
Solution
You can resolve the error by following these steps:
Create a file named src/types/cetus-sui-clmm-sdk.d.ts.
console.log('start main');
import { SDK } from '@cetusprotocol/cetus-sui-clmm-sdk';
console.log('imported');
const sdk = new SDK(netConfig.testnet);
console.log('ok');
Error Details
/usr/bin/node ./src/main.js
start main
main.ts:1
Process exited with code 1
Uncaught SyntaxError SyntaxError: Unexpected token ;
at Module._compile (<node_internals>/internal/modules/cjs/loader.js:723:23)
/usr/bin/node ./src/main.js
start main
main.js:1
Process exited with code 1
Uncaught SyntaxError SyntaxError: Unexpected token ;
at Module._compile (<node_internals>/internal/modules/cjs/loader.js:723:23)
Unfortunately, a solution for Error 2 could not be found.
Version
You are using the following versions:
package.json
The following dependencies are set:
Error 1
The following error occurs:
Solution
You can resolve the error by following these steps:
src/types/cetus-sui-clmm-sdk.d.ts
.Add the following content to the file:
Error 2
The following runtime error occurs:
TypeScript code
Error Details
JavaScript code
Error Details
Unfortunately, a solution for Error 2 could not be found.