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

A few issues in the example directory #70

Closed
06kellyjac opened this issue Oct 4, 2021 · 11 comments
Closed

A few issues in the example directory #70

06kellyjac opened this issue Oct 4, 2021 · 11 comments

Comments

@06kellyjac
Copy link

I'm getting Error: Cannot find module 'utf8' with both nodejs-app and nodejs-ts-app

Also with nodejs-ts-app it isn't resolving the type definitions properly so I made these changes to tsconfig:

"strict": false,
"noImplicitAny": false,

And the docs for nodejs-ts-app says to do npm run -- '{\"message\": \"world\" but that is wrong, it should be npm start -- '{\"message\": \"world\"

@06kellyjac 06kellyjac changed the title A few issues in the example repo A few issues in the example directory Oct 4, 2021
@srenatus
Copy link
Contributor

srenatus commented Oct 5, 2021

Thanks for raising these! Would you be up to opening a PR, or should we make this is as good-first-issue?

@06kellyjac
Copy link
Author

Im happy to open a PR for the tsconfig and npm start but I have no idea where to start with the UTF8 issue

@srenatus
Copy link
Contributor

srenatus commented Oct 5, 2021

I think all the example apps are running on CI...? so, what's your node version?

@06kellyjac
Copy link
Author

I was using 14.17.6
I can try a couple of versions and note incompatibilities in the README

If you know what works in CI thatd help too

@srenatus
Copy link
Contributor

srenatus commented Oct 5, 2021

https://github.com/open-policy-agent/npm-opa-wasm/actions/runs/1244485210 We're testing with Node 12.x and 14.x

@06kellyjac
Copy link
Author

👍

Ill try specific node and opa versions

my OPA was 0.33.1 I tried a local build (using nix) and the release build from GH. I just noticed it says WebAssembly: Unavailable on the one from GH and I'm not confident my local build has actually built with working WebAssembly.
Is that feature flag for compiling WASM or just for running WASM?

I guess I should do a full make wasm-test to verify

Also how come deno is added?

@srenatus
Copy link
Contributor

srenatus commented Oct 5, 2021

Any OPA binary can produce wasm bundles (which contain the policy.wasm modules). Only OPA binaries with "WebAssembly: available" can evaluate wasm.

So for this, don't worry about the version output.

@srenatus
Copy link
Contributor

srenatus commented Oct 5, 2021

Also how come deno is added?

Can you elaborate please? Where's the unexpected appearance? I've recently added linting and formatting using deno in CI, because it seemed like an easy way forward.

@srenatus
Copy link
Contributor

@06kellyjac Did you ever get past this? 😃

@06kellyjac
Copy link
Author

Sorry. Yeah I couldnt recreate some of the issues.
Ill try get any of my actually useful changes in a PR over the next day or so

@srenatus
Copy link
Contributor

I'll clean this up as stale, I hope you don't mind. Feel free to re-open.

@srenatus srenatus closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
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

2 participants