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

release-it stuff errors, preventing addon generation #21

Closed
NullVoxPopuli opened this issue Jun 27, 2022 · 8 comments
Closed

release-it stuff errors, preventing addon generation #21

NullVoxPopuli opened this issue Jun 27, 2022 · 8 comments

Comments

@NullVoxPopuli
Copy link
Collaborator

NullVoxPopuli commented Jun 27, 2022

having a flag like #9 would be really good.

Here is the error I got:

 ember addon my-addon -b ../NullVoxPopuli/addon-blueprint/
# ....
Error creating new application. Removing generated directory `./my-addon`
Command failed with ENOENT: create-rwjblue-release-it-setup --no-install
spawn create-rwjblue-release-it-setup ENOENT


Stack Trace and Error Report: /tmp/error.dump.db9873fe8c3dfb583cc98606cb31108f.log

when this error occurs, the addon directory is removed.

@ef4
Copy link
Contributor

ef4 commented Jun 27, 2022

I can confirm that the release-it setup breaks installation for me too.

I suspect it only works for someone who has previously done a global install of create-rwjblue-release-it-setup. At the point where the execa runs, the node_modules haven't been installed yet so execution fails.

@simonihmig
Copy link
Collaborator

Hm, strange. There was indeed this issue before (#11), which was obfuscated for me as I indeed had release-it installed globally. But I thought this was fixed by #12! 🤔

At the point where the execa runs, the node_modules haven't been installed yet so execution fails.

You mean the node_modules of the generated addon? But these are not needed, we need the node_modules of the blueprint, which include create-rwjblue-release-it-setup and which must be there when the blueprint runs. Or what do I miss?

Anyway, I will investigate this later...

@ef4
Copy link
Contributor

ef4 commented Jun 28, 2022

Perhaps that distinction is the problem. If execa is locating node binaries relative to the cwd it wouldn't reliably work here. I don't actually know though what execa is doing.

@simonihmig
Copy link
Collaborator

simonihmig commented Jun 28, 2022

I spent some time on this, but couldn't reproduce...

So it turned out that I did have create-rwjblue-release-it-setup installed globally. However things seem to have been messed up a bit (couldn't yarn global remove it). Probaby due to having installed things with different tools (yarn, volta) over the years, idk... Anyway, after removing create-rwjblue-release-it-setup the blueprint still completed flawlessly!

Then, to rule out anything particular of my (messed up?) system has an effect, I ran the blueprint within a freshly created docker container, no shared volumes, so nothing which could have leaked into it. And there it also works just fine!? 🤔

If you want to try it, this is what I did:

docker run -it node bash
# then, on the guest machine:
npx ember-cli addon my-addon -b embroider-build/addon-blueprint --yarn

Just to rule this completely out: you both have been using the very latest version of the blueprint, not any eventually stale local copy?

If execa is locating node binaries relative to the cwd it wouldn't reliably work here

The fix (#12) I mentioned above specifically makes sure that execa looks for it based on the blueprint's folder, see https://github.com/embroider-build/addon-blueprint/blob/main/index.js#L83

@jrjohnson
Copy link

I can confirm that installing create-rwjblue-release-it-setup globally fixed this error for me.

@NullVoxPopuli
Copy link
Collaborator Author

should we remove release-it from the blueprint?

how someone chooses to release is kind of a separate concern from project generation

@jrjohnson
Copy link

I, personally, prefer to release addons through a GitHub workflow and choose the release type manually so I've never used release-it.

I thought I would find it helpful when moving ember-render-modifiers to v2 as I don't really know how to port the existing configuration over. However, after looking at the changes I'm even less confident that I know the right path forward. I'm not sure what is new and good and should be used from the blueprint vs what is part of a good configuration that will continue working on the existing codebase which doesn't conform to the blueprint for known and correct reasons.

Don't have a strong opinion either way - just providing some info.

@NullVoxPopuli
Copy link
Collaborator Author

release-it removed here: #323

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

4 participants