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

Bold Init: Does not have a script named "command" #213

Open
Quadriphobs1 opened this issue Dec 21, 2018 · 13 comments
Open

Bold Init: Does not have a script named "command" #213

Quadriphobs1 opened this issue Dec 21, 2018 · 13 comments

Comments

@Quadriphobs1
Copy link

Title Description
Version 0.22.5
Type Issue
node 10
Operating System MacOs Mojave
Short Description Create a new folder and typed npm init -y then bolt init and I get Package at "path-to-folder" does not have a script named "command"
Detailed description It is meant to actually initialise the bolt instance
@Quadriphobs1
Copy link
Author

Actually, the problem happens with every bolt command I run

@lukebatchelor
Copy link
Member

Hiya, you don't need to run bolt init, that's just to run yarn init and probably isn't implemented.

Have you added the workspaces field to your package.json?

@Quadriphobs1
Copy link
Author

Yeah I have workspace in the package.json but if I should run any bolt command I would defined get same error.

@ajaymathur
Copy link
Member

Hey @Quadriphobs1 , Can you create a minimum reproducible example? That will defiantly help us understand the issue better, 🙂

@Quadriphobs1
Copy link
Author

screenshot 2018-12-24 at 06 55 39

No matter what command I run, even bolt help

@Quadriphobs1
Copy link
Author

So I had to do some digging to this, I cloned the repo local and remove the bolt i have locally already, then I link the cloned bolt version, and in the folder I will be using the bolt I had to link it using yarn link bolt which would install the bolt version to the package.json by running the bolt init it works by showing the yarn init walkthrough

@Quadriphobs1
Copy link
Author

Also creating another example and just install bolt as part of the dev-deps works as fine by running yarn bolt --command--

@lukebatchelor
Copy link
Member

Can you link a repo that we can test in?

Fyi, you also don't need to bolt init, that's just an alias for yarn init.

@ajaymathur
Copy link
Member

ajaymathur commented Dec 25, 2018

@Quadriphobs1 So, if I have got it correct. Issue was with the bolt that you had globally installed. Does reinstalling it( instead of linking the local repo ) resolve the issue?

Try:

yarn global remove bolt
yarn global add bolt

@Quadriphobs1
Copy link
Author

Quadriphobs1 commented Dec 25, 2018

No it doesn't, instead I installed bolt as a devDeps and use yarn to run a the bolt command like yarn bolt command

@ajaymathur
Copy link
Member

@Quadriphobs1 Globally installed bolt should work fine. I am using it in multiple projects.

Do you mind pushing your repository code so that I can clone it in local and test. Also, please post the version of yarn that you are using.

If you feel comfortable we can share screen and thus I can help you debug the issue. 🙂

@pastelsky
Copy link
Contributor

pastelsky commented Dec 30, 2018

@ajaymathur I faced a similar issue while running any bolt p run command. I believe this was something that was fixed recently with
#210

This issue makes the bolt p run series of commands practically unusable anywhere where one relies on the status code of the executed command. It looks like it might be related to this issue as well. Considering the impact, can this fix be released on npm?

@lukebatchelor
Copy link
Member

@pastelsky , I don't think they're related at all but I've released that change in 0.22.6. That should fix your bolt p problems.

This issue looks to be something wrong with the users global installation but the user isn't replying to we can't replicate anywhere. I installed the same version of bolt and node and can't replicate (you shouldn't every be able to see a message that says does not have a script named "command" unless you literally ran

bolt command
bolt w command
bolt ws command 
bolt p command

Otherwise, it would have to say the name of the command it was running.

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