Open LeosPrograms opened 7 months ago
@LeosPrograms this is the bug that was related https://github.com/h-REA/hREA/issues/315
I am trying to make sense of what can be done
what version of nodejs are you on?
and, you could try bumping this version of holochain client to one of the most recent, but hopefully that wouldn't create other issues https://github.com/h-REA/hREA/blob/365962e0c89237ed44ec2b4cafe0402b638d1ebd/modules/vf-graphql-holochain/package.json#L44
It does seem strange that you're getting this error. I was able to run an installation on a fresh clone without issues, though I did have to cherry-pick @LeosPrograms' commit to fix the launch command (thanks for that).
Just to be sure we're on the same page, this should reset you:
nix develop
npm run clean
pnpm i
npm start
However, there is also a partially completed upgrade to Holochain 0.2.x in progress on sprout
that seemed simpler at first glance than it turned out to be. Apologies for that, I should have put it on a branch and it's overdue that I gave it some attention to fix up the 2 failing tests.
It might also be worth separating out npm start
and running the sub-commands, as this will make retesting quicker.
pnpm run build
need only be called once, or after changes to Rust code.modules/
either. You can run npm run build:graphql:adapter && npm run build:graphql:client
once, or after changes to that code.npm run dev:graphql:explorer
npm run dht
npm run test:integration
since the unit tests are very limited and take a long time to compile.@LeosPrograms I see what's wrong. It's actually a bug in the TypeScript build configuration of the GraphiQL explorer. So the libraries compile fine but npm run dev:graphql:explorer
fails, mostly because GraphiQL is an outdated bit of kit that depends on a lot of older versions of things.
I don't know that it's necessarily worth fixing this at the moment given that we could spend a lot of time upgrading GraphiQL & its underlying React / Webpack config; or even swap it out for a more modern client app. I'll update the issue title and leave this open, in any case.
For now if it's possible to do your testing as integration test scripts then I think that's the best way of proceeding. Have a look at the 'test' script in test/package.json
, copy that command, remove the quote escaping and add an npx
before tape
, and run it from the test/
directory. If you take the piping to tap-dot
off the end you will see all the output, and you can change the glob expression from **/*.js
to target individual test files rather than running the entire suite. Hope that is an ergonomic-enough way of working for now! :slightly_smiling_face:
It should look something like this:
TRYORAMA_LOG_LEVEL=debug WASM_LOG=debug RUST_LOG="debug,wasmer_compiler_cranelift=error,holochain::core::workflow=error,holochain::conductor::entry_def_store=error" RUST_BACKTRACE=1 GRAPHQL_DEBUG=1 npx tape some/test-file.js
Note above^ the CI process will no longer build the explorer *.webhapp
file until this issue is resolved.
This is an error in
apps/hrea-graphql-explorer
due to non-compliant ESModules being used by the Holochain client libraries. It only affects this example app and does not impact building & packaging of the hREA libraries, or execution of integration tests.The bug manifests with the following terminal output: