ember-cli-create
ember-cli-create copied to clipboard
Error: Project creation failed during initiation.
I tried to create a new project with the Octane + TS blueprint, but faced the following error:
Could not setup your project: Project creation failed during initiation.
Nothing other than that is reported, so I can't really give any more information that that.
I tried both
npx ember-cli-create
And this
yarn global add ember-cli-create
ember-cli-create
but both have the same issue
That error appears when the folder couldn't be created during the init step (which runs ember new). I've seen this in only rare cases and the solution was to run it again 😄 - so maybe this can help other than that could maybe be a permission thing. At least ember new fails here.
I was trying to make it in my Desktop directory, so I don't think it's a permissions issue. I was able to ember new an application with the same name into the same location.
I have no idea why this is failing. All I do is this:
https://github.com/gossi/ember-cli-create/blob/ae310fdde4077e57e30cca259359d63d84a3914c/src/tasks/init.js#L5-L33
where config.cmd is either new or addon
I also have this issue. I originally thought it was due to my use of nodenv but I tried using the standard homebrew installed node and received the same error. I'm also trying this in a folder where permissions shouldn't be an issue. Is there any way for us to enable some more robust logging to try to help track down the issue?
No, nothing like this is built-in 😬 As you can see, it running ember new|addon command with respective args and options. It is piped through execa.
I have seen this error myself, run the same thing one more time and it runs through. If you have suggestions how to debug this, I'm more than happy to integrate them.
It does look like the execa command should be working. I dug around in the source a bit and couldn't log much the console that would indicate otherwise.
Interestingly, the install does work for me if I have ember-cli installed as a global npm or yarn module. I've used ember-cli-create before and I'm sure I didn't previously need to install ember-cli globally. I see that the package.json doesn't explicitly include ember-cli; perhaps a dependency updated and removed an implicit dependency?
I'll see if I can come up with anything else. For now, installing globally does seem to be a valid workaround for me.
Hmm, no - ember-cli-create was never having a dependency to ember-cli itself. That is by design, it will use your globally installed one. Some need to have an explicit version here.
Ah I see; that makes sense. Well, that solves my problem. @alexlafroscia is this also the cause of your issue? Didn't mean to hijack your issue for my user error problems.
I don't have a globally installed Ember executable -- maybe that's the issue? I run everything through npx since global node packages can be problematic sometimes.
If a global ember executable is necessary, maybe there can be a validation for that before running it and a more specific error message provided, so that people know that that's a dependency? I can't find a reference to a global ember executable being necessary anywhere.
Event better, "just working" with npx would be even better -- I think it makes way more sense for tools like this to be used that way so that you always are starting a project with the latest version, rather than having a global version that needs to be updated/maintained considering how infrequently most people use a project bootstrapping tool (not dismiss the usefulness -- it's just only used once per project!)
Ah, I was blindly suggesting everybody has a global ember executable. For me npx made the whole situation worse, so I abandonned it right away 😂 (maybe I need to give it another try).
From what I read, there should be a check for the ember executable, may it be globally installed or accessable via npx. In case it is not, there should for now be at least an error.
ember-cli-create could itself have a dependency to ember-cli but since ec-create is supposed to be installed globally, so would ember-cli. However, I recently discoverd, that @mansona has made installing ember possible without ember-cli being installed globally by just using npm. I see this as an alternative. If it takes all the arguments, that ember-cli would take, it should work that way.
Chris: Can you enlight us here? (will it also work with yarn instead of npm?)
You may want to take a look at what we're doing in https://github.com/ember-cli/create-ember-app
We've recently fixed it in the case where you don't have ember-cli installed globally 👍
I am seeing this as well with [email protected] in a linux environment that has node installed, but no global ember-cli. I installed ember-cli globally, tried again, but the same error occurs. I am using the fish shell which may affect environment variables or something? @alexlafroscia what kind of environment are you running the command in?
What name did you use for the project? If i use the string test, it fails each time for me. Using hi causes it to work.
~/Playground> ember-cli-create
? What kind of ember project you want to create? Octane
-> MU, Decorators, Sparkles, ...
? What is the name of your project: hi
...
🐹 Your ember project setup is finished.
🚀 Change to your project directory and enjoy developing:
cd hi/
I'm on macOS with zsh. I just tried this; still got an error

Thanks for testing! For another case, I tried on my mac, using npx as well and it worked. I have ember-cli globally installed.
