Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmwasm-ts-codegen #695

Open
PFC-developer opened this issue Nov 12, 2024 · 0 comments
Open

cosmwasm-ts-codegen #695

PFC-developer opened this issue Nov 12, 2024 · 0 comments

Comments

@PFC-developer
Copy link

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```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant