cosmology-tech / telescope

A TypeScript Transpiler for Cosmos Protobufs ⚛️
https://cosmology.zone/products/telescope
Apache License 2.0
145 stars 43 forks source link

cosmwasm-ts-codegen #695

Open PFC-developer opened 1 week ago

PFC-developer commented 1 week ago

hi. I'm trying to go through your code example on how to use this tool..

the problems I can see are

  1. the generate boilerplate actually has 2 contracts pre-installed

  2. when I try to install one (say wasmswap) I get the following error

    
    ❯ cosmwasm-ts-codegen
    ? [cmd] what do you want to do? install
    ? [pkg] which chain contracts do you want to support? (Press <space> to select, <a> to toggle all, <i> to invert selection)
    npm warn config production Use `--omit=dev` instead.
    (node:88803) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
    Support for loading ES Module in require() is an experimental feature and might change at any time
    (Use `node --trace-warnings ...` to show where the warning was created)
    npm error code ENOENT
    npm error syscall open
    npm error path /private/var/folders/z6/wl_11smx5173mf8j2tg_4jn00000gn/T/nbraukurrqjvo2otyqohj/smart-contracts/package.json
    npm error errno -2
    npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/private/var/folders/z6/wl_11smx5173mf8j2tg_4jn00000gn/T/nbraukurrqjvo2otyqohj/smart-contracts/package.json'
    npm error enoent This is related to npm not being able to find a file.
    npm error enoent
    npm error A complete log of this run can be found in: /Users/iholsman/.npm/_logs/2024-11-12T23_11_48_589Z-debug-0.log
    node:fs:448
    return binding.readFileUtf8(path, stringToFlags(options.flag));
                   ^

Error: ENOENT: no such file or directory, open './smart-contracts/package.json' at readFileSync (node:fs:448:20) at exports.default [as install] (/opt/homebrew/lib/node_modules/@cosmwasm/ts-codegen/commands/install.js:95:58) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async cli (/opt/homebrew/lib/node_modules/@cosmwasm/ts-codegen/cli.js:18:9) at async /opt/homebrew/lib/node_modules/@cosmwasm/ts-codegen/ts-codegen.js:7:5 { errno: -2, code: 'ENOENT', syscall: 'open', path: './smart-contracts/package.json' }

Node.js v23.1.0```