gomplate / gomplate-npm

Install gomplate using npm!
https://gomplate.ca
MIT License
7 stars 1 forks source link

npx gomplate "could not determine executable to run" #8

Closed devthejo closed 2 years ago

devthejo commented 2 years ago

the bin is not at the good path in npm package: here is my current workaround, I had to link it manually


{
  "scripts": {
    "postinstall": "ln -s ../gomplate/node_modules/.bin/gomplate node_modules/.bin/gomplate"
  }
}
hairyhenderson commented 2 years ago

Thanks for moving this over, @devthejo!

@RecuencoJones do you think you could have a look at this?

RecuencoJones commented 2 years ago

Can you please share some details about the environment?

RecuencoJones commented 2 years ago

I think I found the issue 😄 Was trying to reproduce with latest from my go-npm fork, but it is already fixed there!

https://github.com/RecuencoJones/go-npm/blob/master/src/common.js#L45

devthejo commented 2 years ago

Thanks for fixing it, I wait impatiently for the npm release, for now

docker run --rm node:16-alpine npx gomplate --version

npm ERR! could not determine executable to run

hairyhenderson commented 2 years ago

I think we could publish a new version, but then the version wouldn't line up with gomplate's version... 🤔

I'd also like to get a new gomplate release out soon (it's been waaaay too long), so once that happens the npm package will be up-to-date as well... Also note that there are a number of other ways to install gomplate 😉

RecuencoJones commented 2 years ago

Using GitHub dependencies on the package.json should be also possible:

"gomplate": "gomplate/gomplate-npm"

You can also test this with npx:

npx -p "github:gomplate/gomplate-npm" -c "gomplate --version"