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

PKL-Gen-Go not working after installing #34

Open
ApexisDev opened this issue Mar 19, 2024 · 3 comments
Open

PKL-Gen-Go not working after installing #34

ApexisDev opened this issue Mar 19, 2024 · 3 comments

Comments

@ApexisDev
Copy link

Hey,

i just started working with PKL and GO and was going through the Quickstart Tutorial (https://pkl-lang.org/go/current/quickstart.html). On Step 3 "Generate Go Source Code" it tells to install pkl-gen-go using go install github.com/apple/pkl-go/cmd/pkl-gen@latest

After doing so, i tried to run the command pkl-gen-go pkl/ApPConfig.pkl --base-path github.com/myorg/myteam. It results in
zsh: command not found: pkl-gen-go.

I am wondering why it behaves like that, can anyone check up on that?

@bioball
Copy link
Contributor

bioball commented Mar 19, 2024

For the go install route to work, you need to add "$GOPATH/bin" to your PATH (or "$GOBIN" if that is set).

More information about go install here: https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies

@ApexisDev
Copy link
Author

This resolves in
–– Pkl Error –– Cannot find module 'file:///Users/username/Projects/pkl_test/pkl/AppConfig.pkl'.
after running the command succesfully

@bioball
Copy link
Contributor

bioball commented Mar 22, 2024

That error is telling you that the file doesn't exist. Do you have that file on your machine? If not, try giving pkl-gen-go a path that does exist.

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