airgap-it / beacon-sdk

The beacon sdk allows developers of dApps and wallets on Tezos to implement the wallet interaction standard tzip-10.
https://walletbeacon.io
MIT License
101 stars 65 forks source link

unable to install/build for development #346

Closed fredcy closed 1 year ago

fredcy commented 2 years ago

Describe the bug (current behavior) When I attempt to npm install this project it fails.

To Reproduce

$ git clean -dxf
$ git describe
v3.0.0
$ git remote -v
origin  https://github.com/airgap-it/beacon-sdk.git (fetch)
origin  https://github.com/airgap-it/beacon-sdk.git (push)
$ npm install
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.

> prepare
> npm run build

> prebuild
> ts-node --project tsconfig-cjs.json scripts/generate-wallet-list.ts

[Error: ENOENT: no such file or directory, open '/Users/fcy/vendor/beacon-sdk/packages/beacon-blockchain-tezos/src/ui/toast/toast-templates.ts'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/fcy/vendor/beacon-sdk/packages/beacon-blockchain-tezos/src/ui/toast/toast-templates.ts'
}
npm ERR! code 1
npm ERR! path /Users/fcy/vendor/beacon-sdk
npm ERR! command failed
npm ERR! command sh -c npm run build

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fcy/.npm/_logs/2022-05-15T18_30_45_349Z-debug-0.log

Expected (correct) behavior I expected all the necessary dependencies to be installed within node_modules.

Screenshots and/or logs See the above scenario for the error messages that resulted.

Environment

Additional context I'm trying to build all the packages as a baseline for building and testing a PR for an enhancement.

AndreasGassmann commented 2 years ago

Is this error still present in the latest version? If it still doesn't work it would be interesting to see what the difference is between your local setup and the CI (github actions) setup, because there the build seems to work.

JonathanReiss15 commented 2 years ago

I'm having the same error message in my environment as well. I was poking around beacon-sdk/packages/beacon-blockchain-tezos/src/ui and it looks like there is only an /alert directory and no/toast as expected.

zamrokk commented 2 years ago

Same error too

On Linux ubuntu with WSL2

zamrokk commented 2 years ago
[Error: ENOENT: no such file or directory, open '/home/zamrokk/beacon-sdk/packages/beacon-blockchain-substrate/src/ui/toast/toast-templates.ts'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/zamrokk/beacon-sdk/packages/beacon-blockchain-substrate/src/ui/toast/toast-templates.ts'
}

It should come from missing ui files for substrate merge , right ?

zamrokk commented 2 years ago

I did a very ugly workaround, just copy the alert-templates.ts file into the 3 missing file/folders , and it compiles fine after that @AndreasGassmann

AndreasGassmann commented 2 years ago

Looks like this error also appears in the CI, but seems to run through: https://github.com/airgap-it/beacon-sdk/actions/runs/3197895098/jobs/5221723834#step:5:146

I'll take a look.

spacecowb0y commented 1 year ago

This issue is caused due the missing folders for the UI elements (toast in this case). The PR above should fix this ^^.

@zamrokk is not the missing file the problem but the missing folders that allows script/generate-wallet-list.ts to generate those files.